System Design Interview: The Bare Minimum You Need to Know about Load Balancers
I still remember the early day when I failed a dream job interview:
The interviewer drew a box on the whiteboard and said “This is an application server. Now make it highly available”.
“Sure”, I said. I drew a couple more boxes and said “We can replicate the application servers and have a load balancer in front of them that automatically redirects requests to others when a particular one fails”.
The interviewer then asked “What if your load balancer box fails?”
Eh, I didn’t see that coming. I thought he would venture into other more interesting topics like sharing states among application servers, which I had prepared for.
Feeling unease and irritated, I said “Load balancers are typically robust so they rarely fail”.
I could see the smile fade away from his face. And I knew it was over. Indeed, the recruiter sent the reject email a few days later.
Lesson learnt: never take up any fancy pattern or terminology and pretend you understand them. Because when you don’t know what you’re talking about, it’s worse. I felt like a joke that day.
I want to talk about load balancers today in the context of system design interviews. Maybe…