If you find my content interesting, you will love my super practical courses, with a no-fluff no-nonsense approach, that are designed to spark engineering curiosity and help you ace your career.
How to structure your system design interview
System design interviews can be tricky because the discussions are always open-ended. Instead of getting overwhelmed, here is a structured approach that you can use to put your best foot forward and crack it with ease.
1. understand the problem statement: 3 to 4 minutes
Instead of jumping into designing the system from the word go, spend the first few minutes understanding the problem statement, and asking clarifying questions to understand the context, constraints, and expectations.
2. design a day-0 solution: 5 to 7 minutes
Now take 5-7 minutes to design a simple, naive, unoptimized day-0 solution. It is okay if this design is not scalable, available, or fault-tolerant With this the interviewer
will have a fair bit of idea about your approach,
can tell you if you are on the right track or not
or if you should be focussing on a specific component more
3. improve your design: 15 minutes
Now for each component in your system, assume it in different scenarios - large number of requests, system crash, network failures, etc. and see how your system behaves. Rearchitect it to handle the failure cases gracefully, and add new components if required.
4. ask the interviewer for any follow-up questions: 8 minutes
Allow the interviewer to ask you follow-up questions about your system and you provide him/her with justifications for your design and trade-offs you took. This segment is important because it just turned your interview into a discussion.
5. go into finer details: 8 minutes
Depending on the conversation and expectations, touch upon the finer implementation details like handling concurrency, streaming responses, transient failures, etc. This is where you showcase that you know what you are talking about.
This is how I always spend 40-45 minutes during the System Design interviews I appear in. Hope this helps you crack your next one.
You can find this post on my LinkedIn and Twitter; do leave a like.
By the way,
Being hands-on is the best way for you to learn. Practice interesting programming challenges like building your own BitTorrent client, Redis, DNS server, and even SQLite from scratch on CodeCrafters.
Sign up, and become a better engineer.
📹 Video I posted this week
This week I posted How Reddit designed their metadata store to serve 100k req/sec at p99 of 17ms
Reddit's metadata store handles 100,000 req/sec at p99 of 17 ms. I dissected the blog and compiled the learnings into a quick 7-minute video and covered their entire architecture, trade-offs, and the data partitioning strategy.
🧠 Paper I read this week
This week I spent reading SILK: Preventing Latency Spikes in LSM Key-Value Stores
LSM trees power some of the most popular databases like Cassandra, RocksDB, LevelDB, etc; but they suffer from a massive problem. Although they are a popular choice for write-heavy use cases, they see latency spikes under a heavy workload.
This typically happens because internal processes like garbage collection and compaction also contend for the same set of resources on the machine. This weekend I read the paper titled "SILK" which addresses these concerns and is filled with interesting insights.
You can download this and other papers I recommend from my papershelf.
Build a blameless culture, because it matters
Mistakes are inevitable; bugs will hit production; and outages are bound to happen, but how we respond to these errors and events significantly impacts our team's success and overall well-being.
Blameless culture is all about prioritizing learning and improvement over finger-pointing and punishment. It helps in
building a safe space to share and discuss errors openly
building a culture where things are not put under the rug
building a collaborative environment for better decision-making
building a culture of continuous improvement
Few things you can do to build a blameless culture:
shift focus - from "Who made the mistake?" to "What went wrong?"
encourage transparency - reward teams who openly share their challenges
encourage experimentation and learning from failures
create and share RCAs of events in an open channel
Blameless culture is not about ensuring that mistakes never happen. It's about creating an environment where we learn from setbacks and become a better team.
You can find this post on my LinkedIn and Twitter; do leave a like.
📰 Interesting articles I read this week
I read a few engineering blogs almost every single day, and here are the three articles I would recommend you to read.
Thank you so much for reading this edition of the newsletter 🔮 If you found it interesting, you will also love my courses
I keep sharing no fluff stuff across my socials, so, if you resonate do give me a follow on Twitter, LinkedIn, YouTube, and GitHub.