Network Gateway - Service Requirements
These system and resiliency requirements are suggestions, for when deploying these services to individual kubernetes pods or equivalent, and may be tuned to the needs of an individual system runner.
Data Aggregators are stateless, with data stored in the PostgreSQL database.
Only a single Data Aggregator should be (for v1) run at any given time. Having two running will cause many failed database writes as they will step on each other.
The Data Aggregator should be configured to restart on failure. There is a health check endpoint available, discussed in the monitoring guide.
The Data Aggregator automatically runs migrations on start-up. For production environments, these should be run manually for major releases. See the releasing guide for more information.
Suggested system requirements for a data aggregator are:
1 write replicas
2 read replicas
Disk size: 500GB
The database should be deployed resiliently. A managed service such as AWS Aurora is ideal for this.
Read replicas can handle the main query load from the Gateway API; with the read/write primary configured for the Data Aggregator, and for pending transaction status reads and writes from the Gateway API.
Gateway APIs are stateless, and read data from the PostgreSQL database. 1 or more Gateway APIs can be configured to run against the same database, and may be placed behind a load balancer.
The size of the Gateway API and number of Gateway APIs you require will depend on the load profile you expect.
The following is a suggested requirement for a Gateway API server which is set to auto-scale: