| title | Production Checklist |
|---|---|
| description | Checklist for deploying a self-hosted Rivet Engine to production. |
| skill | true |
Also review the general production checklist.
- Validate that you have an admin token configured. Generate a strong, random token for engine authentication. See Configuration.
- Verify your admin token is not exposed publicly. Do not include the admin token in
RIVET_PUBLIC_ENDPOINTor anywhere accessible to clients. See Endpoints. - Configure TLS termination. Ensure connections to the engine are encrypted via a reverse proxy or load balancer.
- Set container resource limits. Recommended at least 1 CPU and 2 GB of RAM per Rivet Engine instance.
- Configure health checks. Set up liveness and readiness probes on port
6421at/health. Recommended timeout of 5 seconds.
- Configure autoscaling for the Rivet Engine. Set target CPU utilization to 70% and memory to 80% to ensure headroom for traffic spikes. In Kubernetes, this is configured via a Horizontal Pod Autoscaler (HPA).
- Use 2+ engine nodes for redundancy. Running a single engine node is a single point of failure. Deploy at least two engine instances behind a load balancer.
- RocksDB only supports a single node. Do not run multiple RocksDB nodes. The file system backend (RocksDB-based) is for single-node deployments. For multi-node and multi-region deployments, use the PostgreSQL backend.
- Validate the rate limit on your serverless actor host. Actor start requests are sent from your engine instances, so they all originate from a small set of IPs. Per-IP rate limits on the actor host will throttle the engine before they would throttle end-user traffic. Size the limit to your peak actor create and wake rate, and configure platform max concurrency (e.g. on GCP Cloud Run) to match your expected concurrent actor count.
- Use PostgreSQL for multi-node and multi-region deployments. Multiple engine nodes can share one PostgreSQL instance. Multi-node also requires NATS (see below). See PostgreSQL.
- Raise
max_connections. Each engine node opens well over a hundred connections under load. Sizemax_connectionsto at least(number of engine nodes × 150)plus headroom. PostgreSQL's default of100is too low. See Connection Limits. - Do not use a connection pooler. Rivet requires direct connections. Do not put PgBouncer, Supavisor, or RDS Proxy in front of PostgreSQL.
- Give PostgreSQL dedicated resources. Provision dedicated CPU, memory, and fast disk, and keep autovacuum healthy. PostgreSQL is the system of record for the whole deployment.
- Configure automated backups. Set up regular backups and point-in-time recovery, and test restoring from them.
- Configure failover. Set up a standby replica with automatic failover to ensure high availability. A single instance is a single point of failure.
- Use one PostgreSQL instance per region. For multi-region deployments, deploy a separate PostgreSQL instance in each region.
- Use FoundationDB for the largest deployments. Enterprise teams running at very large scale can contact enterprise support for FoundationDB guidance.
- NATS is required for multi-node PostgreSQL deployments. Multiple engine nodes on PostgreSQL coordinate through NATS for pub/sub and UniversalDB commit transport. Single-node deployments (one engine node, or the RocksDB file system backend) do not need NATS. See Single-Node vs Multi-Node.
- Deploy 2+ NATS replicas. For multi-node deployments, run at least two NATS replicas for high availability.
- Configure OpenTelemetry. The Rivet Engine supports exporting traces and metrics via OpenTelemetry. Set
RIVET_OTEL_ENABLED=1andRIVET_OTEL_GRPC_ENDPOINTto your collector endpoint (defaults tohttp://localhost:4317). AdjustRIVET_OTEL_SAMPLER_RATIOto control trace sampling (defaults to0.001). See Configuration. - Set up alerts for critical metrics. Monitor engine CPU, memory, request latency, and error rates. Configure alerts to notify your team before issues become outages.
- Contact enterprise support for production-ready deployments. We can help with architecture review, scaling guidance, and FoundationDB support.