Numbers to know: what one machine can really do
Latencies from 1 ns to 1 s, per-node ceilings for Postgres, Redis, Kafka and S3 on 2025–26 hardware, and a lab for “will one box do?”.
Related chapters
- Start here in System Design
- How a system design interview is graded
- The delivery framework: five phases and a clock
- System Design Concepts: CAP, SQL vs NoSQL, Message Queues
- SQL vs NoSQL: How to Choose a Database (System Design)
- Traffic Jumps 10×: What Breaks First? (System Design)
- Proxy vs Load Balancer vs API Gateway (System Design)
- CAP Theorem Explained Simply, with Examples
- Why Use a Message Queue? System Design Explained
- Message Queue vs Pub/Sub vs Kafka: Differences
- Polling vs Long Polling vs SSE vs Webhooks (System Design)
- API design in System Design
- REST vs GraphQL vs gRPC: Choosing an API (System Design)
- API Goals Canvas: Design APIs from the Consumer
- REST API Design: Resources, Methods, Status Codes
- HTTP Semantics, Richardson Maturity Model and HATEOAS
- GraphQL Explained: Over-fetching, Schema, N+1 Problem
- RPC and gRPC Explained: Protobuf, HTTP/2, When to Use
- API Design Best Practices: 9 Principles with Examples
- API Payload Design: Names, Types, Links and Errors
- Mapping Database Tables to API Resources, Step by Step
- API Design for Complex Schemas: Trees, Polymorphism, Bookings
- API Pagination, Idempotency Keys, Errors and Versioning
- Network-Efficient APIs: HTTP Caching, ETags, Field Selection
- Async APIs: 202 Accepted, Webhooks and Bulk Operations
- API Versioning and Evolution Without Breaking Clients
- API Contracts: OpenAPI, Contract Testing and Docs
- API Security: Authentication, Authorization, Rate Limiting
- OAuth 2, OpenID Connect and Scopes for APIs
- OWASP API Top 10 Explained: BOLA, SSRF and More
- Running APIs: Gateways, Mesh, Rate Limits, Canaries
- API Troubleshooting Interview: Slow APIs and Unexpected Errors
- API Design Review: A Staff-Level Capstone
- Spotify Web API: Resources, IDs, Payloads and Paging
- Spotify Web API: OAuth PKCE, Scopes, Quotas, Rate Limits
- Spotify Web API Changes: Real API Evolution Lessons
- Database-heavy designs in System Design
- Design a Distributed Key-Value Store (System Design Interview)
- Design a Hotel Reservation System (System Design Interview)
- Design a Digital Wallet (System Design Interview)
- Design S3-like Object Storage (System Design Interview)
- Games in System Design
- Shard City: Learn Database Sharding by Playing a Game
- System Design Case Studies: Flash Sale, Chat, ChatGPT
- Flash Sale System Design: Who Gets the Last Item
- Food Delivery App System Design: Which Database?
- Cache Stampede: Why the Database Fell Over and the Fix
- Live Streaming System Design: Scaling for a Final
- ChatGPT System Design: Streaming LLM Responses
- RAG System Design: Product Q&A on Sale Day
- IRCTC Tatkal System Design: Booking Under Extreme Load
- Group Chat System Design: WebSockets and Fan-Out
- Authentication in System Design: Sessions, JWT, OAuth
- Authentication Methods Compared: Sessions, JWT, OAuth
- JWT in System Design: Sessions, Revocation, Refresh Tokens
- JWT Interview Questions and Answers
- Life of a session, step by step
- JWT Structure Explained: Header, Payload, Signature
- Forge lab: why verification must be strict
- JWT vs Session Authentication: Which to Use
- The validation pipeline: where a bad request dies
- How to Revoke a JWT: Blocklists and Short Expiry
- Refresh Tokens and Rotation Explained
- Logout in depth: one device, all devices, SSO
- JWT Security Best Practices
- OAuth 2.0 and OpenID Connect Explained
- Where to Store JWT: localStorage vs HttpOnly Cookie
- JWT in Microservices: API Gateway vs Service Validation
- Microservices, keys, and trust boundaries
- Sender-constrained tokens: making a stolen token useless
- Authentication vs Authorization Middleware
- Failure explorer: what breaks when X fails
- Capacity planner: sessions vs JWT vs hybrid
- Edge cases catalog
- Test it, measure it, migrate to it
- Anti-patterns to reject in a design review
- Design checklist and cheat sheet
Keep learning
Overview
L1 cache reference Main memory reference Compress 1 KB (LZ4, Snappy) Read 1 MB sequentially from RAM Random 4 KB read, NVMe SSD HDD-era advice assumed 10 ms here Read 1 MB sequentially, NVMe Round trip, same data centre Redis GET over the network almost all of it is the network Round trip between zones Indexed row from Postgres warm cache, including the network HDD seek First byte from object storage (S3) Round trip, Mumbai ↔ Singapore Round trip, Mumbai ↔ US East New HTTPS connection to US East First token from a large LLM From one nanosecond to one second Bars are on a log scale: each step right is 10× slower. Switch to human scale to feel the gaps. real time At human scale, a memory read takes under two minutes, a call inside the data centre takes six days, and a round trip to the US takes six years. B2B SaaS app 20,000 business users. The honest answer is one Postgres and no cache. Link shortener News feed Chat, 50M daily users Writes are as heavy as reads and every user holds a socket. Shard by chat id. Metrics ingest A million writes a second: a log plus a time-series or columnar store, not a row store. DB writes DB reads (after cache) DB data Cache memory (hot set) Cache operations Open connections Will one box do? Start from a preset, then move the sliders. Each bar is the load against one node’s rough ceiling. no cache One box (plus a replica for failover) does this. Say so in the interview, and say which number would make you change your mind. Beyond one box. Fits, with notes. A large cloud server ~100–200 vCPUs, 0.5–2 TB RAM, tens of TB NVMe, 25–200 Gbps Memory-optimised machines go to 24 TB of RAM. A lot of “big data” fits in one. Stateless API server ~1k–10k requests/s, depending on the work per request adds ~1 ms Easy: add more behind a load balancer. Connection server (WebSocket) ~100k–1M open sockets with tuning Memory per socket and the fan-out to them, not CPU. Relational primary (Postgres, MySQL) Write rate on one primary, or data far past RAM. Add replicas for reads first. Redis / Memcached node Data larger than RAM, or one hot key on one node. Kafka broker ~2–10 ms end to end Object storage (S3, GCS) ~20–100 ms first byte Rarely. Spread keys across prefixes if you need more request rate. DynamoDB partition 3,000 reads / 1,000 writes (units) per second per partition One hot partition key. Spread it with a suffix. Elasticsearch / OpenSearch node Seconds in a day 86,400 ≈ 10⁵ (reads ~14% low) Seconds in a year 31.5 million ≈ π × 10⁷ 1 million per day ≈ 12 per second 100 million per day ≈ 1,200 per second 1 billion per day ≈ 12,000 per second Peak / average A short text row ~100 B–1 KB, with indexes ~2× UUID / int64 / timestamp 16 B / 8 B / 8 B (UUID as text: 36 B) A phone photo, compressed A minute of 1080p video ~40 MB at ~5 Mbps 100 million × 1 KB 100 GB: fits on one disk, nearly in one machine’s RAM system design · start here Numbers to know: what one machine can really do Latencies from a nanosecond to a second, the rough ceiling of each common component, the arithmetic shortcuts, and a lab that tells you when one box stops being enough. Updated for 2025–26 hardware, which is far bigger than most interview advice assumes. Numbers stop you from designing for problems you do not have. A candidate who shards a database that would fit in one machine’s memory looks less senior than one who says “this fits on one box, here is the number that would change that.” You do not need exact figures, just the right order of magnitude and the gaps between them.
1. The latency ladder
Every design decision about caching, regions and call chains comes down to the gaps between these rows. Memory vs network Reading RAM is about 1,000× faster than a call to another server. Local caches beat remote caches for the hottest keys. Calls add up Twenty sequential calls inside a data centre cost ~10 ms. Twenty calls to another continent cost four seconds. Never chain cross-region calls. Disks got fast An NVMe random read is ~100× faster than an old HDD seek. “Disk is slow, cache everything” is HDD-era advice. Light is the limit Mumbai to US East is ~200 ms per round trip and no hardware fixes it. Put data near users or cache at the edge.
2. What each component can handle
These are per node, for ordinary workloads (small rows, simple queries). Heavy queries, big payloads or bad indexes can cut them by 10×. In an interview, quote the range and say what drives it. Rough ceilings per node, 2025–26 cloud hardware Rough ceiling What you outgrow first
3. Lab: will one box do?
The most useful question in any estimate. Try the B2B SaaS preset first: most real systems look like it, and the right answer is “one Postgres, no cache, no shards.” Then try metrics ingest.
4. Arithmetic shortcuts
Round hard, say every assumption, and keep metadata and media on separate lines. The full step-by-step estimate, with a calculator, is in the database design framework, along with the unit slips that produce answers 1,000× off. Conversions worth knowing by heart
5. Advice that has aged badly
A lot of interview material still uses numbers from a decade ago. Interviewers notice. Old advice “Shard once a table passes a few million rows.” An indexed table of a billion rows answers point queries in milliseconds. Shard because of write rate or terabytes, not row count. Servers with 1 TB of RAM are ordinary. The hot set of many products fits on one or two cache nodes. “You need microservices and NoSQL to scale.” Scale is about the hot path and the data layout. Large products run on sharded MySQL and Postgres. Pick the store by the query. 1 billion requests a day is about how many per second, on average? 10⁹ ÷ 86,400 ≈ 11,600. Shortcut: divide by 10⁵ and add a bit. 100 million users with a 1 KB profile each. How much data? Which is slower? Reading 1 MB sequentially from local NVMe One round trip from Mumbai to US East ~0.2 ms vs ~200 ms: the network round trip is about 1,000× slower. An app peaks at 3,000 writes/s with 400 GB of data. Shard the database? Yes, it is large Both numbers are well inside one node. Say what would change it: sustained writes past ~10k/s or data past ~10 TB. One DynamoDB item (a live poll) gets 5,000 writes per second. What happens? Fine, DynamoDB scales automatically It throttles: one partition takes about 1,000 write units/s Auto-scaling adds partitions, but one key lives in one partition. Spread it across N keys (poll#0…poll#9) and sum on read. RAM ~100 ns, same-DC call ~0.5 ms, cross-continent ~100–200 ms. Each gap is ~1,000×. One Postgres: ~10k writes/s, ~10 TB. One Redis: ~100k ops/s. One socket server: ~100k+ connections. Always ask: does this fit on one box? Say the number that would change your answer.
Next
→ SQL vs NoSQL · CAP theorem · what happens when the cache misses · estimation, step by step
More courses
- Jobs, linked to lessons — Browse jobs where every requirement links to the chapter that teaches it. See how ready you are, how long the gap takes to close, and which listings look stale.
- Match a job post to courses — Paste a job post. Each skill is matched to a track here and put in learning order, foundations first.
- React patterns from open source — Patterns extracted from Material UI, Radix, React Aria, React Hook Form, Redux Toolkit, TanStack, and Next.js — not slides about hooks.
- Databases in depth — How a query becomes work. Indexes, isolation, locks, and the plans that explain why a page is slow — not an ORM tour.
- NestJS: build a real API — One ticket-booking API, built in order: a plain Node server first, then NestJS modules, validation, a real database, and the features real clients lean on.
- Microservices — Microservice patterns one diagram at a time: how to split a monolith, how services talk, and how data stays consistent without distributed transactions.
- Kafka — A beginner-to-senior path through event logs, reliable delivery, production operations, and disaster recovery.
- AI engineering for software engineers — Eight free reads, in order, for software engineers moving into AI: when to build an agent, how to build one, how to test it, and how the model works underneath.
- Frontend system design — How a UI is sliced when it is a product, not a page: ownership of state, cache, routes, and what happens when the network lies.
- TypeScript in depth — The type system as a design tool. Inference, narrowing, generics, and the errors that mean the model is wrong — not a catalog of utility types.
- CSS in depth — See the box, then the page. Visual chapters from the box model through Flexbox surprises, Grid, selectors, and units, then backgrounds, shapes, and visual effects, each with a playground.
- Accessibility — Foundations first (WCAG in plain words, semantic HTML, lists, alt text), then hands-on HTML labs, a full pass of WAI-ARIA 1.3, and a final fix-the-page challenge.
- Docker — What an image is, why layers cache, and how containers find each other on a network.
- Redis — Fifteen Redis patterns, one picture each: cache, session, lock, counter, rate limiter, queue, and when Redis is the wrong tool.
- Kubernetes — Kubernetes from zero to operators: why it exists, Pods, Deployments and Services, then configuration, networking, storage, scheduling, scaling and security.
- AWS — AWS networking in plain English. A VPC is a gated housing society: streets are subnets, the Internet Gateway is the main gate, and a route table is the signboard.
- Networking: the NetRoute game — NetRoute is a packet logistics game. You wire up computers, switches, routers, firewalls and gateways, set each device, and watch glowing packets travel. If a packet gets dropped, the game shows you which header field was wrong.