Reference Benchmarks
These benchmarks are from our internal load tests. Your results will vary based on hardware, network, and workload mix. Run the load testing suite on your own infrastructure for accurate numbers.Local Development Benchmarks
Tested on a MacBook Pro (M-series, shared CPU), Strait running withDB_MAX_CONNS=50, WORKER_CONCURRENCY=25, PostgreSQL and Redis co-located.
These numbers represent a floor, not a ceiling. Production deployments on dedicated hardware with
DB_MAX_CONNS=100 will achieve significantly higher throughput. Run the load testing suite on your own infrastructure for accurate numbers.
Hardware Sizing Guide
PostgreSQL Tuning
Connection Pool
The most common bottleneck. Strait usespgx/v5 connection pooling.
Connection Budget
When running multiple Fly machines, the total database connections equalsDB_MAX_CONNS * number_of_machines. Ensure your PostgreSQL max_connections exceeds this sum.
For example, with DB_MAX_CONNS=100 and 4 machines, you need at least 400 connections on the primary. PlanetScale PostgreSQL supports 1000 connections per primary and per replica by default.
PostgreSQL Server
Redis Tuning
Worker Configuration
Scaling Workers
For horizontal scaling, run multiple worker processes:SELECT ... FOR UPDATE SKIP LOCKED, so they naturally load-balance.
Cost Estimation
Compute Cost per 1M Runs
Monitoring Key Metrics
Track these metrics to predict when you need to scale:- Queue depth - If consistently > 0, add workers
- DB connection wait count - If increasing, raise
DB_MAX_CONNS - Worker CPU utilization - If > 70%, add worker instances
- P99 latency trend - If increasing over days, investigate query performance
- Memory RSS - If growing linearly, check for leaks