Capacity Estimation (Converting Product Usage Into Infrastructure Requirements) | PulseSoft
Skip to content

Capacity Estimation (Converting Product Usage Into Infrastructure Requirements)

PulseSoft Team · · 10 min read

A service averages 7,000 requests per second, and the fleet is sized to handle 20,000. It still falls over at 9:05 on a Monday morning. The average was right, and the arithmetic was right. The estimate was still wrong, because it answered the wrong question.

Capacity estimation is usually taught as a multiplication exercise: users times actions, divided by seconds in a day. That part is easy. The difficult part is knowing which number dominates the system: the peak rather than the mean, the tail rather than the median, the 5% of operations that consume 95% of storage, or the retry that turns one failed request into three.

The underlying principle is that a distributed system is a network of queues, and queues respond nonlinearly to load. A model that ignores peak shape, concurrency, and utilization will be confidently wrong.

This article walks through a practical method for converting product usage into requests per second, peak traffic, concurrency, storage growth, bandwidth, and compute requirements. It uses back-of-the-envelope calculations on a hypothetical system, then examines where those estimates break and which assumptions deserve the most scrutiny.

The Core Problem: Usage Is Not Load

Product metrics describe people. Infrastructure responds to operations. Capacity estimation is the translation between the two, and every step of that translation embeds an assumption.

Consider a hypothetical team messaging product with these inputs:

  • 10 million registered users, 20% daily active: 2 million DAU
  • Each active user sends 40 messages per day
  • Each active user generates 300 read requests per day (channel loads, history scrolling, search)
  • 5% of messages carry an attachment averaging 500 KB

The averages come first. A day has 86,400 seconds, which rounds to 10^5 for mental math.

  • Writes: 2M × 40 = 80M per day, or about 930 writes/s
  • Reads: 2M × 300 = 600M per day, or about 6,900 reads/s

These numbers assume traffic is evenly spread across 24 hours. It is not. A workplace product concentrates usage into working hours. If most activity lands in an 8-hour window, the average rate during that window is already 24 / 8 = 3x the daily mean. That gives a first-order peak of roughly 2,800 writes/s and 21,000 reads/s, before accounting for spikes at the start of the workday.

From throughput to concurrency

Requests per second is a rate. Many resources are consumed by the number of requests in flight: threads, database connections, memory for buffered responses. Little's Law connects them:

L = λ × W
in-flight requests = arrival rate × time each request spends in the system

At 21,000 reads/s with a 50 ms mean latency, the system holds about 1,050 requests in flight. That fits comfortably in most connection pools.

Now suppose the database becomes slow rather than unavailable, and mean latency rises to 500 ms. Arrival rate is unchanged, but in-flight requests jump to 10,500. The causal chain is direct:

slow database
→ each request holds a connection 10x longer
→ connection pool exhausts
→ requests queue waiting for a connection
→ client-observed latency exceeds timeout
→ clients retry
→ arrival rate increases while capacity has not
→ latency rises further

Nothing failed. Every component is technically up. The system collapsed because a capacity estimate based purely on throughput ignored that concurrency is a function of latency, and latency is a function of the slowest dependency.

This is the central lesson of capacity estimation: the unit that runs out is rarely the unit you estimated.

Back-of-the-Envelope Calculations as a Systems Model

Peak traffic estimation and the shape of demand

Peak-to-average ratio is the single most consequential assumption in most estimates, and it is rarely measured before launch. A useful way to reason about it is by decomposing peak into layers:

  1. Diurnal concentration. If usage fits inside an h-hour window, peak is at least 24 / h times the mean.
  2. Synchronized behavior. Users do not arrive uniformly within that window. Workday start, scheduled jobs firing at the top of the hour, and push notifications that invite simultaneous opens all create bursts on top of the diurnal curve.
  3. Event-driven spikes. A product launch, an outage recovery, or a viral moment can exceed normal peaks by a large multiple.

Each layer calls for a different response. Diurnal peaks are predictable and can be provisioned for or autoscaled. Synchronized bursts are short, often shorter than autoscaling reaction time, so they must be absorbed by headroom or buffering. Event spikes are often best handled by degradation and admission control rather than capacity.

Global products flatten diurnal peaks because time zones overlap. Single-region workplace products sharpen them. The estimate should state which applies.

Utilization is not a linear resource

The most common error in compute sizing is treating CPU like a bucket: if a node handles 1,000 requests/s at 100%, it handles 900 at 90%. Queueing theory says otherwise.

For a simple single-server queue (M/M/1), mean response time is:

W = S / (1 - ρ)
S = service time, ρ = utilization
UtilizationResponse time as multiple of service time
50%2x
80%5x
90%10x
95%20x

Real systems are not M/M/1, and multi-core servers degrade more gracefully, but the shape holds: latency grows sharply as utilization approaches saturation, and variance grows faster than the mean. This is why capacity targets commonly sit at 50 to 70% utilization for latency-sensitive services. Headroom is not waste. It is the margin that keeps the queueing curve flat.

Combine this with Little's Law and the feedback loop becomes visible. Higher utilization increases latency, higher latency increases concurrency, and higher concurrency increases memory, connection, and lock contention, which increases service time.

Amplification factors

A user action is rarely one backend operation. Capacity estimation must account for multiplication between the user-visible request and the work it causes.

Fanout. In the messaging example, one message sent to a channel with an average of 10 online members produces 10 real-time deliveries. At 2,800 writes/s, the delivery tier handles about 28,000 pushes/s, ten times the write rate. A single channel with 100,000 members in a large tenant turns one write into 100,000 deliveries.

Retries. If each of three service layers retries a failed call up to 3 times, a single failure at the bottom of the stack can produce up to 3 × 3 × 3 = 27 attempts. Retries are invisible in a healthy system and dominant in an unhealthy one, which means estimates based on healthy traffic understate load precisely when capacity matters most.

Cache miss amplification. A cache with a 95% hit rate passes 5% of reads to the database. If the hit rate drops to 90% after a deploy flushes the cache, database load doubles. A cache is a load reducer whose reduction is not guaranteed, so the database must be sized for degraded hit rates, not steady-state ones.

Write amplification. One logical row insert produces a write-ahead log record, a heap or primary-key write, and an update to each secondary index. Three to five physical writes per logical write is a reasonable planning range for a relational table with a few indexes, though the real number depends heavily on storage engine and schema. At 2,800 messages/s, that is roughly 8,000 to 14,000 write operations per second at the storage layer.

Storage growth estimation

Storage estimates fail in a different way: not from spikes, but from compounding.

Text messages at roughly 1 KB each, including metadata and index overhead:

  • 80M × 1 KB = 80 GB per day
  • About 29 TB per year
  • With a replication factor of 3: about 88 TB per year

Attachments:

  • 4M attachments per day × 500 KB = 2 TB per day
  • About 730 TB per year

Attachments are 5% of messages and roughly 25x the storage. This is typical: a minority of operations frequently dominates a resource, and estimating "per message" hides it. The architectural consequence is that these two data types belong in different storage systems with different cost models, durability strategies, and access patterns.

Storage growth also affects operations that were not part of the estimate: backup duration, index rebuild time, replica bootstrap time, and compaction. A database that grows by 29 TB per year will eventually take hours to restore or to bring a new replica online, which turns a routine node replacement into an extended window of reduced redundancy.

Enjoying this so far?

Join thousands of engineers receiving practical engineering, Cloud, Distributed Systems, Infrastructure and AI engineering insights.

No spam. Unsubscribe anytime.

Architecture: The Estimate Mapped Onto a System

Applying these numbers to a concrete hypothetical architecture shows where each estimate lands:

                Clients (~600k concurrent connections at peak)
                           |
                     Load Balancer
                  /                 \
     Realtime Gateway            API Service
     (persistent conns,          (~21k reads/s, ~2.8k writes/s peak)
      ~28k pushes/s)               |        \
            ^                      |         \
            |                    Cache      Object Storage
            |                      |        (~2 TB/day ingest,
            |                      v         ~10 TB/day egress)
            |                  Message DB
            |                  (8k-14k write ops/s,
            |                   ~80 GB/day growth)
            |                      |
            +------ Event Stream <--+
                    (fanout workers)

Compute

Rather than guessing instances, estimate CPU time per request. If a read costs 2 ms of CPU and a write costs 5 ms:

  • Reads: 21,000 × 2 ms = 42 cores busy
  • Writes: 2,800 × 5 ms = 14 cores busy
  • Total: about 56 cores busy at peak, or about 112 cores at a 50% utilization target

Spread across three failure domains, the fleet must survive losing one, so each domain needs enough capacity that the remaining two can carry peak. That raises the requirement by roughly 50%. Redundancy is a capacity requirement, not an afterthought.

Connections

The realtime gateway is sized by concurrency, not throughput. If 30% of DAU are connected at peak, that is 600,000 persistent connections. At an assumed 20 KB of buffers and session state per connection, that is 12 GB of memory across the gateway tier. The binding constraint here is memory and file descriptors, not CPU.

Bandwidth

If each attachment is viewed by 5 people, egress is 10 TB per day: about 116 MB/s, or roughly 0.9 Gbps averaged, and about 2.8 Gbps at a 3x peak. Serving that through the API tier would make the API bandwidth-bound. Serving it directly from object storage or a CDN removes the largest byte stream from the request path entirely.

Failure and scaling boundaries

Each component has a different scaling axis: the API scales with request rate, the gateway with concurrent connections, the database with write rate and data size, object storage with bytes. A single "scale factor" for the system is meaningless. Each boundary must be estimated against its own constraint.

The database is the only stateful component with a serialized write path, so it is where the first architectural decision will be forced as traffic grows.

Making the model executable

An estimate is more useful as a small program than as a spreadsheet cell, because it makes assumptions explicit and sensitivity easy to test:

SECONDS_PER_DAY = 86_400

def estimate(dau, writes_per_user, reads_per_user, peak_factor,
             read_cpu_ms=2, write_cpu_ms=5, target_util=0.5):
    peak_w = dau * writes_per_user / SECONDS_PER_DAY * peak_factor
    peak_r = dau * reads_per_user / SECONDS_PER_DAY * peak_factor
    busy_cores = (peak_r * read_cpu_ms + peak_w * write_cpu_ms) / 1000
    return round(peak_r), round(peak_w), round(busy_cores / target_util)

for peak in (2, 3, 5):
    print(peak, estimate(2_000_000, 40, 300, peak))
# 2 (13889, 1852, 74)
# 3 (20833, 2778, 111)
# 5 (34722, 4630, 185)

The output shows something the single-point estimate hides: the peak factor, the least-measured input, moves the answer more than any other assumption. That tells the team which number to validate first.

Tradeoffs: How to Act on an Estimate

An estimate does not dictate an architecture. It frames a choice about how to absorb the gap between average and peak.

StrategyWhen it makes senseWhat it makes harderFailure mode
Provision for peakPredictable peaks, latency-critical pathsCost; idle capacity most of the dayUnanticipated spikes still exceed it
AutoscalingDiurnal curves that change over minutesCold starts, warm-up of caches and poolsBursts shorter than scaling reaction time
Queue bufferingWork that tolerates delay (fanout, indexing, thumbnails)Ordering, lag monitoring, delivery semanticsConverts overload into unbounded lag
Load shedding and degradationEvent spikes, protection of core pathsDefining which work is optionalShedding the wrong traffic

The choices compose. A sensible design for the hypothetical messaging system provisions the write path and gateway for peak, autoscales the stateless read tier, buffers fanout through an event stream, and degrades search and typing indicators under pressure.

There is also a tradeoff in estimation precision itself:

Estimate qualityAppropriate forRisk
Order of magnitudeChoosing between architecturesMisses a 3x error inside one decade
Within 2xInitial sizing, cost forecastingOverconfidence in unmeasured inputs
Load-tested numbersCapacity commitments, SLOsTest traffic shape differs from production

Back-of-the-envelope calculations exist to answer one question: does this design fit within an order of magnitude of what one machine, one database, or one network link can do? If the answer is "comfortably," the simplest architecture wins. If the answer is "no, by 10x," the estimate has identified the component that must be partitioned, cached, or redesigned.

Failure Modes and What Happens at Scale

Estimates are made for the healthy state. Most capacity failures come from the unhealthy one.

At 10 requests/second, nearly any design works. One database, one service instance plus a standby. Capacity estimation here mainly prevents premature complexity: sharding a system that fits on one node adds routing and coordination costs with no benefit.

At 1,000 requests/second, the dominant risks are dependency latency and connection exhaustion. Little's Law matters more than raw throughput. A 10x latency regression in one dependency produces a 10x concurrency increase in every caller. Timeouts, bounded pools, and retry budgets become part of the capacity model.

At 100,000 requests/second, skew dominates. Averages describe no real partition. One hot tenant, one enormous channel, or one popular key concentrates load on a single shard regardless of total cluster size. Capacity must be estimated per partition at the skewed tail, not across the fleet at the mean.

Several failure modes are specifically capacity failures:

  • Reconnect storms. If a gateway deploy drops 600,000 connections and clients reconnect within 10 seconds, the authentication path sees 60,000 handshakes per second, roughly three times the normal peak read rate, against a cold session cache.
  • Retry storms. Retries multiply load exactly when the system is least able to serve it.
  • Cache cold starts. Hit-rate drops translate directly into database load multiples.
  • Recovery traffic. A queue that accumulated two hours of backlog must drain at a rate well above normal throughput, or it never catches up.

A system has a stated capacity and an actual capacity under recovery. The second is the one that matters.

Engineering Principles

Estimate the constraint, not the average. Every resource has a binding constraint (CPU, connections, IOPS, bytes, memory), and each scales with a different input.

Concurrency is throughput multiplied by latency. Any latency regression is a capacity regression, even when traffic is flat.

Headroom is part of the latency budget. Utilization above roughly 70% buys cost savings with tail latency.

Amplification factors deserve more scrutiny than base rates. Fanout, retries, cache misses, and write amplification often exceed the original request volume.

Minority workloads frequently dominate resources. Five percent of messages can account for over 95% of storage and bandwidth.

Redundancy is capacity. A fleet that only meets peak with every node healthy does not meet peak.

The most uncertain assumption is the one to measure first. Sensitivity analysis turns an estimate from a number into a plan for reducing uncertainty.

Final Thoughts

Capacity estimation is not arithmetic. It is a compressed model of how a system behaves: where requests queue, where state accumulates, which operations multiply, and which component saturates first. The arithmetic is the visible part; the reasoning about peaks, concurrency, utilization, skew, and recovery is what makes the estimate useful.

The goal is not precision. Most inputs are guesses before launch, and they remain partially wrong after it. The goal is to make every assumption explicit, find the one the answer is most sensitive to, and identify the boundary where the current design stops working. An estimate that says "this fits on one database for three years" is as valuable as one that says "this needs partitioning on day one," because both prevent the wrong kind of engineering.

These are the kinds of problems at the center of modern software systems: understanding where state lives, how load moves between components, and what happens when the assumptions between them stop being true. Strong architecture begins with knowing what the system must carry, and what it will carry when things go wrong.

Key Takeaways

  • Capacity estimation must size for peak traffic, and peak-to-average ratio is usually the least measured and most influential assumption, so it should be validated first.
  • Little's Law (in-flight requests = arrival rate × latency) means a slow dependency increases concurrency in every caller, exhausting pools and memory without any increase in traffic.
  • Queueing behavior is nonlinear: response time roughly doubles at 50% utilization and grows to 10x service time near 90%, so headroom is a latency requirement, not wasted capacity.
  • Fanout, retries, cache misses, and write amplification can multiply backend load well beyond user request volume, and they grow largest during degradation.
  • Storage growth estimation should separate data types, because a small fraction of operations (such as attachments) often dominates storage, bandwidth, and backup cost.
  • Each component scales along its own axis (requests, connections, write rate, bytes), so a system has no single capacity number; each boundary needs its own estimate.
  • At large scale, skew rather than total volume determines capacity, so partitions must be sized for the hottest key or tenant, not the fleet average.

Get insights like this in your inbox

Join thousands of engineers receiving practical engineering, Cloud, Distributed Systems, Infrastructure and AI engineering insights.

No spam. Unsubscribe anytime.