🗺️ Crack the System Design Interview @ FAANG (Template)
Tags: interview, career, architecture, developer
Published: 2023-11-25 13:14:22

A system design interview usually lasts for 45-60 minutes. It involves solving an abstract design problem. The problem would be something like ‘Design WhatsApp’. You would not be provided with any other requirements at this stage.

**Note**: Consider that the interviewer is a Engineering Manager. They want to understand how you’ll be creating the system. They will help you with the requirements. Do not assume any requirement. In System Design interviews communication could be even more important than the final result.

## Join Me
Read more about [Engineering Culture in Meta (Facebook)](https://engineeringbolt.com/tech/characteristics-of-high-performing-engineering-teams-in-meta-facebook/), [Twitter](https://twitter.com/alexrashkov/status/1716793056697933916) and [Linkedin](https://www.linkedin.com/in/alexrashkov) for more Career, Leadership and Growth advice.

<a href="https://engineeringbolt.substack.com/subscribe" target="_blank">![Subscribe to Engineering Bolt ⚡ Newsletter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3u2srkrj6arwrs0nclfs.png)</a>

## Step 1: Gather Requirements [10-15 mins]

The first step of a system design interview is to gather the exact requirements for the given problem statement. When you are asked to design WhatsApp, your design is not expected to consider all the functionalities that WhatsApp provides.

Let’s say you don’t know what WhatsApp is, you should start by mentioning that you don’t know about it. The interviewer would, let’s say, respond with “it is a chat application”.

Once you have a broad idea about the problem statement, ask for all the requirements. 

### Functional Requirements (FR) [5-7 mins]

Start by gathering the features (Functional Requirements) that the chat application should have. Think of common features that such an application might have. After every question, wait for the interviewer to answer and note it down. Provide your inputs if required.

[Example Functional Requirements >](https://engineeringbolt.com/tech/system-design-interview-template-meta-crack-the-process/#system-design-interview-functional-requirements)

### Non-Functional Requirements (NFR) [5-10 mins]

Once you have an idea about the functionalities (FR), you need to clarify the non-functional requirements from the interviewer. After every question, wait for the interviewer to answer and note it down. Provide your inputs if required. Some of these questions would be dependent on the approved functional requirements.

[Example Non-Functional Requirements >](https://engineeringbolt.com/tech/system-design-interview-template-meta-crack-the-process/#system-design-interview-non-functional-requirements)

## Step 2: API Design [3-5 mins]

Based on the functional requirements, list down all the API endpoints that you need to expose from your system.

Make sure to double-check if you’ve supported all the approved requirements. Verify the same with the interviewer before moving to the next step.

Best Practices:

- [Backend Rest API Development – Basics](https://dev.to/cesareferrari/back-end-api-development-introduction-d57)
- [Designing REST APIs: Best Practices](https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/)

## Step 3: High-Level Design and Discussion [15-20 mins]

Once the requirements are clear and you have the API design ready, it is time to sketch out the high-level design of your system.

Let’s consider a sample high-level design of a given system. A basic overview of how the high-level design of a system might have these components:

- **Clients**: Multiple mobile devices and laptops denoting the clients.
- **CDN**: The clients would get static data from the CDN.
- **Load balancer**: The clients would talk to a load balancer for dynamic data.
- **Application servers**: There would be many application servers behind the load balancer.
- **Database**: The application servers would talk to one or more SQL/NoSQL servers with some replication/sharding/partitioning involved.
- **Microservices**: The application servers would talk to other internal servers if the system has a microservices architecture. Example: Auth Service.
- **Queue**: The application servers would add some events/messages to a queue with certain workers listening to the queue for events.
- **Cache**: The application servers might fetch data from the cache before hitting the database.

[High-Level System Design and Discussion - Architectural Diagram >](https://engineeringbolt.com/tech/system-design-interview-template-meta-crack-the-process/#system-design-interview-meta-high-level-architectural-diagram)

There could be other components as well and a few of these components might not be there in the design.

## Step 4: Metric Estimation [5 mins]

Estimate the different metrics of the different functionalities and your entire system. This would you help you decide the resources and number of machines required for each of the components.

The common metrics that you should estimate are:

- Throughput
- Latency
- Memory
- Storage

This can be approximately calculated based on the NFRs and the high-level system.

References: [Latency numbers every programmer should know](https://gist.github.com/hellerbarde/2843375)

## Conclusion

This template should provide you with a strong guide to follow during a System Design Interview.

This template has been used and proven to work for many System Design Interviews at companies like Meta, Google, Uber, Microsoft, Ola, etc. and engineers I have coached in the past have cleared the System Design round at all of these companies.

If you’re a beginner in System Design then you may want to go through “[System Design Interview @ Meta (Facebook) Complete Guide](https://engineeringbolt.com/tech/systems-design-interview-meta-complete-guide/#things-you-must-know-in-system-design)” to get a decent idea about the different components and trade-offs involved in designing a scalable system.

## Join Me
Read more about [Engineering Culture in Meta (Facebook)](https://engineeringbolt.com/tech/characteristics-of-high-performing-engineering-teams-in-meta-facebook/), [Twitter](https://twitter.com/alexrashkov/status/1716793056697933916) and [Linkedin](https://www.linkedin.com/in/alexrashkov) for more Career, Leadership and Growth advice.

<a href="https://engineeringbolt.substack.com/subscribe" target="_blank">![Subscribe to Engineering Bolt ⚡ Newsletter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3u2srkrj6arwrs0nclfs.png)</a>