We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Core Fundamentals
Free preview: the first 2 parts of this 10-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Core Fundamentals
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
In November 2022, a small team launched a chatbot called ChatGPT. They expected modest interest, maybe a few thousand users. In the first five days, one million people signed up. Within two months, 100 million. It was the fastest-growing consumer application in the history of the internet.
And it crashed. Repeatedly. "ChatGPT is at capacity" became a meme. The servers couldn't keep up. OpenAI scrambled to add more GPU clusters, optimize inference, implement queuing systems, and build out infrastructure that could handle demand orders of magnitude beyond what they'd planned for.
This is the scalability problem in its purest form: your system works perfectly at 1,000 users. What happens at 1,000,000?
Most systems don't fail because the code is bad. They fail because the architecture can't handle the load. A beautifully written Python function that takes 50ms at 100 requests per second turns into a 5-second response at 10,000 requests per second, not because the function got slower, but because 9,900 requests are stuck in a queue waiting their turn.
Scalability is the art and science of designing systems that grow gracefully. It's arguably the core skill of system design, the one that separates a prototype from a production system, and a junior engineer from a senior one.
Scalability is a system's ability to handle increased load by adding resources, without requiring a redesign of the system.
That last part is important. If handling 10x more traffic requires rewriting your entire application from scratch, you didn't build something scalable. If it requires adding more servers, adjusting some configuration, and maybe upgrading your database tier, that's scalable.
Systems can grow in three different directions, and each presents different challenges:
1. User scale, more concurrent users. 100 users to 1 million. This is the most common scaling challenge and primarily affects compute and .
2. Data scale, more data stored and queried. 1 GB of data to 1 PB. This primarily affects storage and query performance.
3. Geographic scale, users spread across the globe. A system that works great for users in New York might be unusable for users in Tokyo due to .
| Dimension | Challenge | Solutions |
|---|---|---|
| User scale | More concurrent requests | More servers, caching, load balancing |
| Data scale | Larger datasets, slower queries | , indexing, archiving, read replicas |
| Geographic scale | High latency for distant users | CDNs, multi-region deployment, edge computing |
Ideally, if you double your resources, you should handle double the load. That's linear scaling, the holy grail.
In practice, adding resources has diminishing returns because of coordination overhead. Two servers can't do exactly twice the work of one because they need to coordinate (share data, manage locks, synchronize state). This is sub-linear scaling, the realistic best case.
Some systems actually get worse as you add resources. More database replicas mean more lag. More microservices mean more network calls. This is super-linear scaling cost, and it's a sign your architecture needs rethinking.