# System design sizing calculators

Source: https://systemdesignsim.com/learn

Learn

The practical half of system design: how many servers, which database, how big a cache, and what it all costs on AWS. Each page has a calculator that shows its working.

## Start with the numbers

Traffic, servers and instance sizes: the arithmetic every design begins with.

* ### [Availability nines](https://systemdesignsim.com/learn/availability-nines)
  [Calculate allowed downtime for 99.9%, 99.99% and other availability targets across a day, 30-day month or year, with the formula and dependency caveats.](https://systemdesignsim.com/learn/availability-nines)

  [Open calculator →](https://systemdesignsim.com/learn/availability-nines)
* ### [Back-of-the-envelope estimation](https://systemdesignsim.com/learn/back-of-the-envelope-estimation)
  [The numbers and formulas behind system design estimates: requests per second from daily users, storage, bandwidth, cache size and latency.](https://systemdesignsim.com/learn/back-of-the-envelope-estimation)

  [Open calculator →](https://systemdesignsim.com/learn/back-of-the-envelope-estimation)
* ### [Users per server](https://systemdesignsim.com/learn/how-many-users-can-a-server-handle)
  [About 1,000 requests a second for a 2-vCPU m7g.large, or roughly 1.5 million daily users. The formula, worked examples from 10K to 100M users, and a calculator.](https://systemdesignsim.com/learn/how-many-users-can-a-server-handle)

  [Open calculator →](https://systemdesignsim.com/learn/how-many-users-can-a-server-handle)
* ### [AWS instance sizes](https://systemdesignsim.com/learn/aws-instance-sizes)
  [What t4g.micro, m7g.large and c7g.xlarge mean, how much CPU and RAM each has, what each costs, and how many requests per second it handles.](https://systemdesignsim.com/learn/aws-instance-sizes)

  [Open calculator →](https://systemdesignsim.com/learn/aws-instance-sizes)

## Databases and caches

Size the database, its replicas and connections, and the cache in front of it.

* ### [Database sizing](https://systemdesignsim.com/learn/database-sizing)
  [Size an RDS for PostgreSQL database from reads, writes and working set: when to scale up, add read replicas or shard. With a calculator.](https://systemdesignsim.com/learn/database-sizing)

  [Open calculator →](https://systemdesignsim.com/learn/database-sizing)
* ### [Redis memory](https://systemdesignsim.com/learn/redis-memory-size)
  [Estimate Redis memory from your keys and values, add per-key overhead and ElastiCache's 25% reserve, and pick the right node size.](https://systemdesignsim.com/learn/redis-memory-size)

  [Open calculator →](https://systemdesignsim.com/learn/redis-memory-size)
* ### [DynamoDB hot partitions](https://systemdesignsim.com/learn/dynamodb-hot-partition)
  [Each DynamoDB partition takes 1,000 write and 3,000 read units a second. Find out whether your busiest key exceeds it and how many suffixes to split it into.](https://systemdesignsim.com/learn/dynamodb-hot-partition)

  [Open calculator →](https://systemdesignsim.com/learn/dynamodb-hot-partition)
* ### [Connection pool size](https://systemdesignsim.com/learn/connection-pool-size)
  [HikariCP's formula (core_count \* 2) + effective_spindle_count, Little's law for your query load, and the Postgres max_connections limit across all app instances.](https://systemdesignsim.com/learn/connection-pool-size)

  [Open calculator →](https://systemdesignsim.com/learn/connection-pool-size)
* ### [Read replicas](https://systemdesignsim.com/learn/read-replicas)
  [Divide reads per second by what one replica can safely serve, after headroom. Includes the RDS replica limits and the replication lag caveat.](https://systemdesignsim.com/learn/read-replicas)

  [Open calculator →](https://systemdesignsim.com/learn/read-replicas)
* ### [Cache hit ratio](https://systemdesignsim.com/learn/cache-hit-ratio)
  [Database load equals total reads times (1 minus hit ratio). Solve for the hit ratio that keeps your database under its capacity, and see the effective latency.](https://systemdesignsim.com/learn/cache-hit-ratio)

  [Open calculator →](https://systemdesignsim.com/learn/cache-hit-ratio)

## Streams and queues

How many partitions or shards a stream needs for its throughput.

* ### [Kinesis shards](https://systemdesignsim.com/learn/kinesis-shards)
  [Size a Kinesis data stream: 1,000 records or 1 MB a second in and 2 MB a second out per shard. Count the shards, find the limit that binds, and price it.](https://systemdesignsim.com/learn/kinesis-shards)

  [Open calculator →](https://systemdesignsim.com/learn/kinesis-shards)
* ### [Kafka partitions](https://systemdesignsim.com/learn/kafka-partitions)
  [Confluent's rule: at least max(t/p, t/c) partitions for target throughput t, producer throughput p and consumer throughput c per partition. Calculate yours.](https://systemdesignsim.com/learn/kafka-partitions)

  [Open calculator →](https://systemdesignsim.com/learn/kafka-partitions)

## What it costs

Where a CDN, serverless or an LLM call changes the monthly bill.

* ### [CDN cost](https://systemdesignsim.com/learn/cdn-cost)
  [CDN pricing explained: CloudFront charges per request and per GB. Compare that CDN cost with running servers, see when it saves money and when it costs more, with a calculator.](https://systemdesignsim.com/learn/cdn-cost)

  [Open calculator →](https://systemdesignsim.com/learn/cdn-cost)
* ### [LLM cost per query](https://systemdesignsim.com/learn/llm-cost-per-query)
  [Work out what each LLM answer costs from its tokens, the monthly bill, the tokens-per-minute quota you need at peak, and the latency. With a calculator.](https://systemdesignsim.com/learn/llm-cost-per-query)

  [Open calculator →](https://systemdesignsim.com/learn/llm-cost-per-query)
* ### [Lambda vs EC2](https://systemdesignsim.com/learn/lambda-vs-ec2-cost)
  [Compare AWS Lambda plus API Gateway with EC2 servers behind a load balancer. Find the break-even request rate for your run time and memory.](https://systemdesignsim.com/learn/lambda-vs-ec2-cost)

  [Open calculator →](https://systemdesignsim.com/learn/lambda-vs-ec2-cost)

## One system design problem a week

A real scenario, its constraints, and where the obvious design breaks.

## Now break one yourself.

The first challenge takes about two minutes. No signup.

[Design your first system](https://systemdesignsim.com/challenges/hello-load-balancer)
