Back to blog

One server, 10 million users: how does a photo app survive that?

Thắng Đoàn
Thắng Đoàn

You built a photo app called FotoFlow. It works. Then the users arrive, and every new order of magnitude breaks something different.

This series follows FotoFlow from 100 users on one lonely server to 10 million users who want direct messages. Every post is one problem at one size, one fix, and the honest cost of that fix. Nothing more. You can read each post in about five minutes.

The idea: one app, one growth arc

Most system design content teaches patterns in isolation. Load balancing here, sharding there, caching somewhere else. You memorize the words and still cannot say why your own app is slow.

So this series does the opposite. FotoFlow starts small and grows. At each size, one thing breaks first. The post explains what broke, the standard fix, and what the fix costs you. The next post builds on the last, so the architecture grows with you instead of appearing fully formed.

There is no free scaling. Every fix trades something away, and knowing the trade is the actual skill. Bigger servers cost money. Caches cost consistency. Microservices cost operational pain. The series names the price every time.

The journey, in 40 stops

Foundations (posts 1 to 3): where the milliseconds of one page load go, the difference between slow and busy, and how to size a system on a napkin.

Scaling (posts 4 to 8): bigger versus more servers, load balancers, stateless services, caching, and content delivery networks.

Data and storage (posts 9 to 19): SQL versus NoSQL, indexes, storage engines, replication, sharding, unique IDs, the CAP theorem, consensus, transactions, and where photo files actually live.

Communication (posts 20 to 23): REST, GraphQL and gRPC, message queues, pub/sub, and real-time updates.

Reliability (posts 24 to 27): failover, rate limiting, timeouts and retries, and observability.

Architecture (posts 28 to 31): when to split the monolith, service discovery, sagas, batch versus stream processing.

Security (posts 32 to 34): authentication, authorization, encryption.

Shipping (posts 35 to 36): testing and CI/CD.

Whole systems (posts 37 to 40): design docs, then three end-to-end designs: a URL shortener, the home feed, and a chat system.

How to read it

Read in order if you are learning. Jump anywhere if you have a specific pain. Every post states FotoFlow's size at the top, states the problem in two sentences, and ends with three recap points. No post assumes you remember all the earlier ones.

What this does not solve

This is one app's journey, not the encyclopedia. Each topic gets one short post, which means depth is trimmed on purpose. Consensus, isolation levels, and storage engines each fill whole books. Use this series to build the map, then go deep where your own system hurts.

Before you read on: what is the first thing you expect to break when an app ten-tuples its users?
And when your own project last got slow, could you say in one sentence what actually broke?

That is the whole game: knowing what broke, and what the fix costs.

Next in the series: Where do the first 200 ms of a photo page actually go?

Sources

System Design Primer

Designing Data-Intensive Applications

undefined

Google SRE Books

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

No pasting. This is the challenge.0/200

Typed live, never pasted.