Resource estimation in the real world
medium 28 minPublished figures are anchors for a sanity check, not facts about your system.
Video lesson · Chapter 1 of 6
Convert published totals to average rates
Sleeps four, they said
1:15Reel coming soon
Theory
Read or listen first. About 2 min.
What it is
An anchor is a real number you can compare an estimate with: how many searches a large engine answers, how many messages a chat carries, what one cache server did in a benchmark, what a machine costs a month.
Anchors come in three qualities. Best is what you measured on your own system. Next is a figure published by the people who run the system or wrote the software, with a date. Last are rules of thumb, which are useful if you call them that.
Why it exists
An estimate without a comparison is hard to judge. If your sum says that a small shop needs more requests a second than the largest search engine, something is wrong.
Anchors also mislead. A benchmark measures tiny values on a quiet machine, a company figure may be ten years old, and some numbers that everyone repeats have no source at all. Part of the skill is to know which is which.
A short history
1988
The Transaction Processing Performance Council is founded, so that vendors compare database systems under one set of rules.
2009
Facebook engineers describe Haystack, their photo store, with real figures: 60 billion images, 1.5 PB, 550,000 images served per second at peak.
2013
Twitter reports an average of about 5,700 posts a second and a record second of 143,199, about 25 times as many.
2014
LinkedIn engineers publish a Kafka benchmark with its full setup: two million small records a second on three cheap machines.
2024
Netflix reports a peak of 65 million concurrent streams for one live event.
Words to know
- Anchor
- A known figure used to check an estimate.
- Benchmark
- A measured result under stated conditions.
- Primary source
- The people who ran the system or the test.
- Hit ratio
- Share of reads answered by the cache.
- Egress
- Data sent out of a cloud, usually paid by the gigabyte.
- On-demand price
- List price without a commitment.
- PoP
- Point of presence of a network or CDN.
How it works
Step through the idea, or press Play.
Anchor. A sourced figure with a date
Understand it
Start here
Sleeps four
A tent is sold with a label: sleeps four. It was tested with four people and nothing else. Your trip has rucksacks. Benchmarks are the same: true, under conditions that are not yours.
The label was not a lie. It answered another question.
Why
What real numbers are good for
Check an estimate
Is 100,000 a second realistic for this product?
Feel the scale
Ten thousand and ten million a second are different worlds.
Talk with context
Name the source and the date, then the sum.
Choose a technology
Cache, database or queue: each has a usual range.
How far may I trust a number?
Scale
From a startup to massive
Sizes can be computed from users instead of remembered. Assume 50 requests a user a day, a peak of three times, 10% writes of 1 KB, one copy, text only.
| Stage | Daily users | Peak requests | New text a year | Usual shape |
|---|---|---|---|---|
| Startup | up to 100,000 | up to 170/s | up to 180 GB | one server, one database, a standby |
| Growing | 100,000 to 1M | 170 to 1,700/s | 0.2 to 1.8 TB | a few servers behind a balancer |
| Medium | 1M to 10M | 1,700 to 17,000/s | 2 to 18 TB | cache, read replicas |
| Large | 10M to 100M | 17,000 to 170,000/s | 18 to 180 TB | partitioned data, CDN, more regions |
| Massive | over 100M | over 170,000/s | over 180 TB | specialised parts for each job |
One row worked out
Anchors
Published figures, with sources
| System | Published | Per second | Who and when |
|---|---|---|---|
| Google Search | more than 5 trillion searches a year | about 160,000 | Google, 2025 |
| Google's index | well over 100,000,000 GB (100 PB) | Google, How Search works | |
| roughly 100 billion messages a day | about 1.2 million | Facebook earnings call, Q3 2020 | |
| over 500 million posts a day; record 143,199 in one second | about 5,700 average | Twitter engineering, 2013 | |
| Facebook photos | 220 million new photos a week; 550,000 images a second served at peak | about 360 new photos | Facebook engineering, 2009 |
| Netflix | 301.63 million memberships; 65 million concurrent streams in one event | Netflix, end of 2024 and November 2024 | |
| Wikipedia and sister projects | 11.56 billion page views by people in October 2026 | about 4,300 | Wikimedia public API |
| Amazon DynamoDB | peak of 146 million requests a second on Prime Day | 146 million | AWS, 2024 |
| Cloudflare | 81 million HTTP requests a second on average, 129 million at peak | 81 million | Cloudflare, 2025 |
| Discord | trillions of messages on 177 Cassandra nodes | Discord engineering, about 2022 | |
| AWS | 39 regions, 124 availability zones | AWS, November 2026 |
Totals into rates
Peak against average, measured
- Cloudflare: 129 / 81 is 1.6 times. Many sites and time zones even each other out.
- Twitter's record second: 143,199 / 5,700 is 25 times. One television moment, one second.
What that means for you
- Three times is a starting assumption, not a law.
- The shorter the window you look at, the higher the peak.
Check
Catch a number that cannot be true
Someone tells you that Netflix streams 15 PB a day. Divide by people.
Per member
Sanity check for a company figure
Stores
What one node may carry
Where to start planning
| Store | Reads a second | Writes a second | Typical latency | Used for |
|---|---|---|---|---|
| Redis | 100,000 | 100,000 | under 1 ms | cache, sessions |
| Memcached | 100,000 | 100,000 | under 1 ms | simple cache |
| PostgreSQL | 10,000 to start, tens of thousands tuned | thousands, 10,000 as the line | 1 to 10 ms | transactions, complex queries |
| MySQL | as PostgreSQL | as PostgreSQL | 1 to 10 ms | web applications |
| MongoDB | tens of thousands | tens of thousands | 1 to 5 ms | documents |
| Cassandra | thousands to tens of thousands | tens of thousands | 1 to 10 ms | many writes, time series |
| Elasticsearch | hundreds to thousands | thousands of documents | 10 to 100 ms | full-text search |
What a cache leaves over
50,000 reads a second
| Hit ratio | Reach the database | Share |
|---|---|---|
| 0% | 50,000/s | 100% |
| 50% | 25,000/s | 50% |
| 80% | 10,000/s | 20% |
| 95% | 2,500/s | 5% |
| 99% | 500/s | 1% |
One or many
When to split a database
One database is fine
- Under about 10,000 simple reads a second, or a cache takes them
- Well under 10,000 small writes a second
- Hundreds of gigabytes, even a few terabytes
- Hundreds of millions of rows with the right index
- The hot part fits in memory
Think about splitting
- Writes near 10,000 a second after batching
- Size towards 30 TB, or restores that take too long
- Billions of rows and slow maintenance
- Replicas and a cache are not enough
- No larger machine is sensible
Before you split
Machines
Servers and networks
Starting points for one server
| Role | Size | Plan with | Depends on |
|---|---|---|---|
| Web or API server | 4 vCPU, 8 GB | 1,000 to 5,000 requests/s | simple reads and writes |
| Application server | 8 vCPU, 16 GB | hundreds to several thousand/s | work per request |
| WebSocket server | 8 vCPU, 32 GB | 50,000 to 100,000 connections | messages on them, memory each |
| Database server | 16 vCPU, 64 GB, SSD | 10,000 to 50,000 simple queries/s | query shape, hot data in memory |
Capacity from cost per request
Network
| Thing | Figure | Basis |
|---|---|---|
| Server network card | 10 Gb/s = 1.25 GB/s | common size, arithmetic |
| TCP connections | 65,535 ports from one client address to one server address and port | a connection is two addresses and two ports |
| HTTP/2 streams a connection | limit set by each side; 100 is the smallest recommended | RFC 9113 |
| DNS lookup, not cached | tens to a few hundred ms | rule of thumb |
| Same data centre | about 0.5 ms | rule of thumb |
| Another zone, same region | 1 to 2 ms | rule of thumb |
| East US to West US | 69 ms | Microsoft, Azure |
| East US to UK South, West Europe | 78 ms, 83 ms | Microsoft, Azure |
| East US to Japan East, Southeast Asia | 162 ms, 224 ms | Microsoft, Azure |
Money
What it costs a month
AWS list prices, us-east-1, on demand, 730 hours, November 2026
| Part | Price | A month |
|---|---|---|
t3.medium, 2 vCPU, 4 GB | $0.0416 an hour | about $30 |
m5.large, 2 vCPU, 8 GB | $0.096 an hour | about $70 |
m5.xlarge, 4 vCPU, 16 GB | $0.192 an hour | about $140 |
RDS PostgreSQL db.m5.large, one zone | $0.178 an hour | about $130, disk extra |
ElastiCache Redis cache.r5.large | $0.216 an hour | about $158 |
| S3 standard, 1 TB | $0.023 a GB | about $23, requests extra |
| Data out to the internet, 1 TB | $0.09 a GB at first | about $90 |
| Application load balancer | $0.0225 an hour | about $16, plus usage |
A medium social app, priced
PRICE = {"server": 70, "db": 130, "cache": 158, "storage TB": 23, "out TB": 90}app = {"server": 20, "db": 2, "cache": 3, "storage TB": 10, "out TB": 5}for part, n in app.items(): print(f"{part:11} {n:3} x {PRICE[part]:4} = {n * PRICE[part]:5,}")print("total a month:", f"{sum(n * PRICE[p] for p, n in app.items()):,}")At a larger scale the order turns round. Assume 15 PB of video a day at 0.02 dollars a GB: 15,000,000 GB × 0.02 is 300,000 dollars a day. At that size a company starts to think about its own content network.
Speak
Using anchors well
Three uses in an answer
Interviewer
Why do you want a cache?
You
We have 50,000 reads a second. One relational database is planned with about 10,000. With a 90% hit ratio 5,000 remain, so one database and a replica carry them. Redis documentation shows benchmarks above 100,000 simple commands a second, so one node could do it and I run two so that one can fail.
Interviewer
A billion users with 10 KB each. Shard?
You
That is 10 TB, which one large machine holds, though restores take long. If we write 100,000 a second, that decides: I would split by user id, so that one user's reads stay on one shard.
Interviewer
Is 160,000 searches a second believable?
You
Google published more than five trillion a year in 2025. That is about 160,000 a second on average, so for the whole world's largest engine, yes. For our shop, no.
Do
- Say "roughly" and name the source
- Explain what would change it: hardware, query, size
- Admit when you do not know: "I think around X"
- Offer the measurement that would settle it
Avoid
- Inventing a company's number
- Quoting ten-year-old figures as today
- Using a benchmark as your capacity
- Dropping names instead of arithmetic
From label to plan
Summary
The whole topic in one minute.
Use published figures to check the number of zeros, with their date and source, and never as the capacity of your own system. Turn totals into per second, compare per person, and distrust a figure that fails that check.
Planning starts from rules of thumb: 10,000 simple reads a second for one relational database, 100,000 simple commands for one Redis server, hundreds to a few thousand requests for one application server. Then measure, price the parts, and write down the line at which the design changes.
- Anchors check zeros, measurements set capacity.
- Source and date, or call it a rule of thumb.
- Divide any big total by people and by seconds.
- Hit ratio from 95% to 99% is five times less load.
- Price the parts: the largest line is the first to question.
Sources
- Google: AI, personalization and the future of shopping (5 trillion searches)
- Google: organizing information (index size)
- Facebook Q3 2020 earnings call transcript (WhatsApp messages, PDF)
- Facebook engineering: Needle in a haystack
- InfoQ on Twitter's 2013 engineering post
- Netflix Q4 2024 shareholder letter (PDF)
- Netflix: 65 million concurrent streams
- AWS: Prime Day 2024
- Cloudflare: 2025 year in review
- Discord: how Discord stores trillions of messages
- LinkedIn engineering: benchmarking Apache Kafka
- Wikimedia page views API, September and October 2026
- AWS global infrastructure
- AWS price list (service index)
- Redis: benchmark
- Microsoft: Azure network round-trip latency
- RFC 9113: HTTP/2