Sidecar Calculator — calculate sidecar for tech projects. Formula, specs, and practical notes.
A database and container sizing calculator estimates the key capacity numbers for distributed data infrastructure: the number of database shards required for a given dataset, B-tree index storage size, request throughput (RPS) for a given concurrency model, CPU and memory totals for Docker or Kubernetes deployments, expected replication lag under a given write rate, and the failure rate that will trip a circuit breaker. These calculations underpin capacity planning for microservices, cloud-native databases, and container orchestration platforms.
Related calculators: the API and cloud cost calculator for estimating the monthly cost of the infrastructure being sized, and the DevOps metrics calculator for tracking operational health after deployment.
Shard count — shards = ⌈total_data_GB / max_shard_GB⌉; total with replicas = shards × replication_factor
Index size (B-tree) — index_bytes = rows × avg_key_bytes × overhead_factor (typical 2–3×)
RPS throughput — RPS = concurrent_users × requests_per_session / session_duration_seconds
Container totals — total_CPU = pods × cpu_per_pod (cores); total_RAM = pods × ram_per_pod (MiB)
Replication lag — lag_ms ≈ (write_MB_s / link_MB_s) × 1000 + RTT_ms
Circuit breaker — failure_rate = failures / total_requests × 100%; trips to Open when rate ≥ threshold
For Elasticsearch, keep individual shards between 10 and 50 GB and limit total shard count to approximately 20 per GB of JVM heap. For Postgres with partitioning or Citus sharding, 25–100 GB per shard is typical depending on query pattern. An RPS figure from the throughput tab tells you what your application servers must sustain at peak — compare it against your framework's benchmarked single-instance throughput to determine how many application instances (pods) you need. For circuit breakers, a 50% failure rate threshold is a common default (Hystrix, Resilience4j), but latency-sensitive services often use a lower threshold of 20–30% to fail fast and protect downstream systems.
Database and infrastructure sizing figures are estimates based on simplified models. Real-world performance depends on query patterns, hardware I/O characteristics, network topology, and software versions. Validate estimates with load testing and monitoring before committing to production capacity decisions.