Ask anything about this post!
In the last post, we left off with a big problem.
We have one server trying to handle millions of users.
Imagine a restaurant with just one waiter. One customer comes in? Easy. Ten customers? Manageable. One thousand customers show up at once? 🚨
Chaos. Orders get lost. The waiter collapses. The restaurant shuts down.
In tech terms: The server crashes. CPU hits 100%. RAM fills up. The website goes offline.
So, how do we fix this?
Option A: Build a super-powerful, mega-expensive computer. 💸 (But even that has a limit. And what if that one machine breaks?)
Option B: Buy 10 normal, cheaper computers. 🖥️🖥️🖥️ (Now we have plenty of space to handle the traffic!)
But wait... if we have 10 servers, how do users know which one to talk to? If everyone rushes to Server #1, and Servers #2 through #10 are sitting idle... we still have a problem.
We need a manager. Someone to stand at the door and say:
“Hey you, go to Server #1.” “You, go to Server #3.” “Server #5 looks tired, go to Server #2.” That manager is called a Load Balancer. ⚖️
It sits between the users and your servers. It receives all the incoming traffic and distributes it evenly across all your servers.
Result?
System Design Lesson #1: You don't make one computer infinitely powerful. You make many computers work together.
The Load Balancer is the glue that holds it all together.
Have you ever tried to buy a ticket online for a concert or a flash sale (like Flipkart/Amazon) and the site crashed? 📉 That is usually a failure of scaling (and likely, a missing load balancer).
Tell me about a time a website crashed on you in the comments! 👇
Thank you for reading our blog!
We have a Discord community where you can ask questions and get help from the community.
No comments yet. Be the first to share your thoughts!