System Design Cases
Numbers Every Engineer Should Know
Latency hierarchy, capacity defaults, storage sizes, peak factors. The cheat sheet for back-of-envelope estimation.
Numbers to know: durable relationships, measured constants
Hardware and cloud-service constants age quickly. A table copied from an old machine is not a capacity plan. Keep durable unit relationships in memory, then benchmark the actual instance type, storage class, network path, runtime, payload and request mix.
Time and rate
- 1 second = 1,000 milliseconds = 1,000,000 microseconds = 1,000,000,000 nanoseconds.
- 1 minute = 60 seconds; 1 hour = 3,600 seconds; 1 day = 86,400 seconds.
- Average rate = work per window / seconds in that window.
- Peak is a measured distribution or an explicit scenario multiplier, never “average × a universal constant”.
Percentiles are not additive in general. Measure end-to-end p50/p95/p99 and use tracing to locate contributors. State whether timeouts are included, censored or counted as failures.
Bits, bytes and prefixes
One byte is eight bits. SI prefixes are decimal: k = 10^3, M = 10^6, G = 10^9. Binary prefixes are Ki = 2^10, Mi = 2^20, Gi = 2^30. Use MB/s for decimal megabytes per second, MiB/s for binary mebibytes per second, and Mbit/s or Gbit/s for link rates. Never use “GB” to mean both 10^9 and 2^30 bytes in one calculation.
Payload throughput is not complete network throughput. Add measured request/response headers, TLS, transport, retries, replication and encoding. Check ingress, egress and east-west traffic separately.
Storage
Daily logical bytes = objects/day × average encoded bytes/object.
Physical storage additionally includes replication or erasure coding, indexes, metadata, write-ahead logs, compaction/merge headroom, temporary migration space, backups/snapshots and retention. Compression ratios and record sizes are workload measurements. Use sensitivity ranges rather than one precise-looking result.
Concurrency and Little's Law
For a stable system with matching boundaries:
L = λW
L is average items in the system, λ is effective arrival/throughput rate, and W is average time in the system. Example: 2,000 completed requests/s with 0.080 s mean time implies 160 average in-flight requests. This is a mean relationship, not a tail-capacity guarantee. Bursts, variability, retries and failures need tested headroom.
Capacity is measured
Benchmark until throughput, latency, errors and one or more resources reveal the knee. Publish the safe envelope with:
- software/configuration version and hardware;
- request mix, payload distributions and cache state;
- concurrency, locality and failure mode;
- p50/p95/p99 latency and error rate;
- CPU, memory, GC, disk and network saturation;
- the chosen operating headroom.
An RPS number without these conditions is not portable evidence.
Scenarios
A complete binary-storage conversion with an explicit per-day assumption.
End-to-end measurement and percentile-aware tracing.
Payload bytes/s converted to bit/s before measured overhead.
Average concurrency derived from effective rate and mean in-system time.
Load-test the production mix and operate before the SLO knee.
Primary sources
- NIST Guide to SI prefixes: https://www.nist.gov/pml/special-publication-811/nist-guide-si-chapter-4-two-classes-si-units-and-si-prefixes
- NIST binary prefixes and byte definition: https://physics.nist.gov/cuu/Units/binary.html
- Little, A Proof for the Queuing Formula L = λW: https://pubsonline.informs.org/doi/10.1287/opre.9.3.383
- Google SRE, Addressing Cascading Failures and load testing capacity limits: https://sre.google/sre-book/addressing-cascading-failures/