Skip to content

Commit 7cdfbb2

Browse files
authored
Add production deployment recommendations
1 parent b36ed8b commit 7cdfbb2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ query {
2222
}
2323
```
2424

25+
## Running in production
26+
27+
The provided docker compose setup is a minimal configuration best suitable for dev and testing envorinmonents. For a stable production deployment we recommend the following.
28+
29+
- Use a private gRPC endpoint (`WS_PROVIDER_ENDPOINT_URI` env variable)
30+
- Use managed Postgres database with non-root access (`DB_*` env variables)
31+
- Collect and monitor [Prometheus](https://prometheus.io/) metrics exposed at port 9090
32+
- Increase `WORKERS_NUMBER` to speed up the syncing. Usually somewhere between 5-50 workers is a sweet spot depending on the gRPC endpoint capacity.
33+
34+
To reliably run a Squid Archive we recommend 16GB RAM and modern CPU. Database storage requirements depend on the size of the network. A rule of thumb is to reserve around 100 kb per block, so e.g. for Kusama with ~10M blocks one needs about 1Tb for Postgres storage.
35+
2536
## Type definitons updates
2637

2738
Most chains publish type definitions as an npm package. Some archives (e.g. shiden or bifrost) has a script `gen-types.js` for generating the json type defintions. To update, run from the corresponding folder

0 commit comments

Comments
 (0)