- The system design interview simulates real-life problem solving where two co-workers collaborate on an ambiguous problem and come up with a solution that meets their goals.
- The ability to ask good questions is an essential skill.
- Over-engineering is a real disease of many engineers as they delight in design purity and ignore tradeoffs.
4-step process for effective system design interview
Step 1 - Understand the problem and establish design scope
- DON'T give out an answer quickly without thinking.
- One of the most important skills as an engineer is to ask the right questions, make the proper assumptions, and gather all the information needed to build a system.


Step 2 - Propose high-level design and get buy-in
- Come up with an initial blueprint for the design. Ask for feedback. Treat your interviewer as a teammate and work together.
- Draw box diagrams with key components on the whiteboard or paper. This might include clients (mobile/web), APIs, web servers, data stores, cache, CDN, message queue, etc.
- Do back-of-the-envelope calculations to evaluate if your blueprint fits the scale constraints. Think out loud. Communicate with your interviewer if back-of-the-envelope is necessary before diving into it.
At the high level, the design is divided into two flows: feed publishing and news feed building.
- Feed publishing: when a user publishes a post, corresponding data is written into cache/database, and the post will be populated into friends’ news feed.

- Newsfeed building: the news feed is built by aggregating friends’ posts in a reverse chronological order.

Step 3 - Design deep dive
You shall work with the interviewer to identify and prioritize components in the architecture.
Time management is essential as it is easy to get carried away with minute details that do not demonstrate your abilities.
Detailed design for Feed publishing

Detailed design for News feed retrieval

Step 4 - Wrap up