This content originally appeared on Level Up Coding - Medium and was authored by Manoj Chemate
How I Approached System Design Interviews with Amazon and Microsoft
When it comes to designing software systems there are multiple tools, technologies, and principles but here we will just focus on how to approach system design interviews. There are a number of ways to approach system design interviews considering one's experience and knowledge, here are the steps which helped me to clear SDE-2 and L-61 interviews with Amazon and Microsoft.
Listen to the question carefully, sometimes it's just a one-liner statement and you are expected to figure out details going ahead, start by gathering requirements from the interviewee, don’t be in a hurry here, and spend a good amount of time here.
1. Functional Requirements (What does the system do?)
Be a user
Try to collect a set of features from the user's perspective or from the perspective of another tech team that will be using this system. You can ask/think about the below questions while gathering functional requirements.
- What is the set of features we are going to support?
- What will be the actions performed by the user?
- What is the input and output of the system for each user interaction?
- Who are the consumers of data? ( Users / Other tech teams)
2. Non-Functional Requirements (Quality of system?)
Get some stats
Look at the system from the technical perspective.
Think about the scale of the system with the help of the below parameters:
- A number of active/passive/live users.
- Requests/Queries per second (RPS/QPS).
- The growth rate of requests.
then try to figure out the quality of the system with the help of the below questions.
1. Do we need a consistent or highly available or partition tolerant system? what can we compromise? how many nines of availability? (CAP Theorem)
2. Is it a real-time system or an asynchronous system?
3. What could be expected latency/response time/throughput?
3. Capacity Estimation (How big is the system?)
Do some basic maths
You can do some rough calculations for required system resources
- What are storage and memory requirements?
- What are engineering efforts and dollars required?
Usually, I won’t spend much time on this but do check with your interviewee on how far he wants to go.
4. High-Level Design (How does the system look like?)
Draw some diamonds, squares, circles, and arrows.
Discuss trade-offs and bottlenecks while choosing one over the other.
It’s time to start designing features from the bottom up, you can start discussing
- How will data come into the system, how will you process data and where will you store the data?
- Talk about how will data go out of the system.
- Which database to use? SQL/NoSQL and why so? if NoSQL which NoSQL?
- Are there any hot spots for data? Do we need to cache data? What is your caching strategy?
- Can queue solve some problems for you?
- Do you need rate limiting?
- What are the different types of Load Balancers(LB) and Load balancing strategies? Which one will you choose and why?
- Talk about networking protocols.
Discuss how you are going to scale each component of your system:
- How to scale reads and writes on SQL/NoSQL? What is your primary key? Partition key? Clustering key? Replication Strategy?
- How will you split reads and writes and handle sharding?
- How will you scale reads/writes in distributed Cache?
- Who are your producer and consumer for the distributed queue? How does it scale?
5. Detailed Design (What is the system?)
Spell it out
You might be asked to design tables and APIs in detail with corresponding queries, do it with the help of the below questions
- What are your database tables, columns, document structures, keys, and indices?
- Define your APIs, how does the request-response structure look like?
- How do your classes, objects, and interactions look i.e low-level design?
Ensure that your system satisfies all the collected feature requirements and you have discussed trade-offs and bottlenecks of the designed system.
If Time Permits
You can discuss around:
- Authentication and authorization mechanism
- Log analysis systems
- Monitoring / Performance measurement
- Analytics and Reporting
- Cost / Development Time / Tech Stack
Practice is the key!
Level Up Coding
Thanks for being a part of our community! Before you go:
- 👏 Clap for the story and follow the author 👉
- 📰 View more content in the Level Up Coding publication
- 🔔 Follow us: Twitter | LinkedIn | Newsletter
🚀👉 Join the Level Up talent collective and find an amazing job
How I Approached System Design Interviews with Amazon and Microsoft? was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Level Up Coding - Medium and was authored by Manoj Chemate
Manoj Chemate | Sciencx (2022-09-15T15:30:27+00:00) How I Approached System Design Interviews with Amazon and Microsoft?. Retrieved from https://www.scien.cx/2022/09/15/how-i-approached-system-design-interviews-with-amazon-and-microsoft/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.