31 system design interview questions (and sample answers)

System design interview questions are tough to crack if you aren't well prepared. The questions are broad, have multiple possible answers, and require some foundational systems knowledge. 

To help you, we’ve put together this list of 31 system design interview questions, reported by real tech candidates at Amazon, Facebook, Google, and Microsoft. Use these to prepare your answers for your upcoming interviews, and make a great impression on your interviewers.

First, we’ll start with the five most common questions that come up in system design interviews, with tips on how to answer each of them.

Let’s get started.

1. 5 most common system design interview questions

Before we get to a complete list of system design interview questions, let’s take a minute to go over the five most common questions that we found in our research.

These questions come from Glassdoor interview reports by software engineers, engineering managers, and technical program managers at Amazon, Facebook, Google, and Microsoft.

Together, these five questions made up nearly 30% of the system design interview questions that we collected across these roles. 

To help you prepare answers to these questions, we’ve included a framework that you can use to structure your thinking. For the sake of brevity, we won’t be writing out entire sample answers for each question, but we’ll be linking to full answers that you can use to check your work.

Let’s get started.

1.1 Design a social media app (e.g. Twitter, Instagram)

One of the most common system design interview questions, “design a social media app” requires candidates to tackle an incredibly complex task—building a large, intricate system in 60 minutes or less. For this example, we’ll assume the interviewer asked us to design Twitter.

Ask clarifying questions

  • Is the interviewer looking for a design of the core features, or a high-level overview of the whole service?
  • What are the constraints of the system?
  • What are your assumptions? (traffic distribution, number of active users and tweets, read vs write-heavy)

Design high-level

  • Back-of-the-envelope calculations: average KBs per tweet, size of new tweet content per month, read requests and tweets per second, etc.
  • High-level components: write, read, and search APIs; types of databases; SQL vs NoSQL; etc

Drill down on your design

  • Potential bottlenecks: adding a load balancer with multiple web servers, scalability issues, fanout service slowing down tweets and @replies, etc.
  • Components that you could dive into: how a user views the home timeline or posts a tweet, the intricacies of the database design, etc.

Bring it all together

  • Consider: does the final design address the bottlenecks you’ve identified? Does it meet the goals you discussed at the beginning of the interview? Do you have any questions for the interviewer?

For a full answer to this question, take a look at the video guide below from Success In Tech or this text guide from donnemartin on GitHub. 

1.2 Design a messenger (e.g. Whatsapp)

Real-time messaging apps are a common standalone product, or a built-in feature of larger systems. Here, you’ll need to consider how to coordinate and deliver messages with a high number of users sending messages simultaneously.

Ask clarifying questions

  • What is the scale and profile of the user base?
  • What features should be incorporated into the messenger? (e.g. text, video, audio, read receipts, message encryption, etc.)
  • Should we focus on monetizing the system?

Design high-level

  • How many servers will this system need, and how will clients connect to them?
  • How will the senders and receivers of messages connect to the servers and database?
  • Where will the messages be stored, and for how long?

Drill down on your design

  • How will you scale the system, and where are the bottlenecks?
  • Deep dive into a component: sent, delivered, read notifications; push notifications; media sharing; database design; etc.

Bring it all together

  • Have you met the initial goals you and the interviewer laid out for the system? 

For a full answer to this question, take a look at the video guide below from Success in Tech or this tech guide from Suraj Kumar, via Medium.

1.3 Design a web cache

A distributed web cache is key to many systems, so that the RAM of multiple machines can be accessed in a single in-memory store quickly and reliably. Let’s look at some general points that should help you build out a design.

Ask clarifying questions

  • Consider the functional and non-functional requirements: put (storing objects under a unique key), get (retrieving objects), scalability, availability, performance, etc.
  • Specify your assumptions: can we assume that put and get are strings?

Design high-level

  • Possible data structures for storing data: hash table, queues, doubly linked list
  • Consider different options to distribute the cache, as well as the benefits of each (e.g. dedicated cache clusters vs co-located caches) 

Drill down on your design

  • Identify the tradeoffs of your choices: Maximum hash table size will prevent from adding more elements, shards may become “hot” (aka process more requests than others), etc.
  • Data replication could help with “hot” shard bottleneck

Bring it all together

  • Is the system you’ve designed fast, highly scalable, and available?

For a full answer to this question, take a look at the video guide below from System Design Interview.

1.4 Design a parking lot

For questions like these, interviewers are testing your skills in object-oriented design, to see whether you can apply technical thinking to physical objects. 

Ask clarifying questions

  • Is this a multiple floor parking garage or a single level parking lot?
  • How many entry and exit points will be needed, and for what types of vehicles?
  • Are there monetary goals for this parking lot?

Design high-level

  • Possible use cases: customers parking and paying for their spot, admin managing the system, parking attendants maintaining the lot and helping customers, etc.
  • Possible classes of the system: ParkingLot, ParkingFloor, ParkingFloor, Account, ParkingTicket, Vehicle, etc.

Drill down on your design

  • How will you diagram specific activities? (e.g. customers paying for parking tickets, display panels showing available spots, etc.)
  • What are the required enums, data types, and constants of the eventual code for the parking lot system?

Bring it all together

  • Will this system meet the requirements you’ve laid out with the interviewer in the beginning of the session?

For a full answer to this question, take a look at this text guide from Educative.io.

1.5 Design TinyURL

URL shortening services like TinyURL provide short link aliases that redirect to longer URLs. Here are some points of consideration to help you work out how to build this kind of system. 

Ask clarifying questions

  • Will users be able to customize the URL?
  • How long do the URLs last before they expire?
  • What are the availability and latency requirements for this system?

Design high-level

  • Back-of-the-envelope calculations: estimate the traffic and storage needs per month, as well as bandwidth and memory requirements
  • Define the APIs (SOAP, REST, etc) as well as a general database schema (URL mappings and user data)

Drill down on your design

  • Consider tradeoffs: encoding actual URLs may turn out the same shortened URL for two different users who enter the same URL. System may not work for URLs with URL-encoding. Concurrency may cause problems, etc.
  • Where will you place load balancers, and how will you cache URLs?

Bring it all together

  • Is the system you’ve designed highly available, so that URLs will not break if the servers go down? Does it meet any potential business objectives laid out at the start of the interview?
For a full answer to this question, take a look at this text guide from Educative.io.

2. System design interview questions from FAANG interviews

Now that we’ve gone through the most common system design interview questions, as well as how to solve each of them, let’s get into a longer list of the system design questions that have been asked in real tech interviews, according to data from Glassdoor.

Use this list (as well as the steps we’ll lay out in section 3) to practice your answers to new system design questions, without using hints or consulting an answer before you’re finished.

Consider the below list as your "one-stop-shop" for practice questions, as it's representative of the types of system design questions you'd be asked at leading tech companies, like Facebook, Google, Amazon, and Microsoft.

Example system design interview questions

Facebook system design interview questions

  • Design an online collaborative editing tool
  • Design a distributed botnet
  • How would you use a load balancer for memcache servers?
  • How would you architect the Facebook newsfeed?
  • Implement a typeahead feature

Google system design interview questions

  • Design and implement statistics for a calendar
  • Design a task scheduling feature
  • Design a ticketing platform
  • Design an elevator
  • Design a boggle server
  • Design a distributed ID generation system
  • How would you deploy a solution for cloud computing to build in redundancy for the compute cluster?
  • Design the server infrastructure for GMail

Amazon system design interview questions

  • How would you design an electronic voting system?
  • Design a warehouse system for Amazon
  • Design an online poker game
  • Design a system to interview candidates
  • Design a search engine autocomplete
  • Design an airport
  • How would you design a system that reads book reviews from other sources and displays them on your online bookstore?
  • Design a promotion mechanism which could give 10% cash back on a particular credit card
  • How would you build software behind an amazon pick up location with lockers?

Microsoft system design interview questions

  • How does buffer overflow work?
  • How would you design an online portal to sell products?
  • Design a new fitness wearable to measure heart rate
  • Design a shopping cart

3. How to prepare for system design interviews

As you can see from the complex questions above, there is a lot of ground to cover when it comes to system design interview preparation. So it’s best to take a systematic approach to make the most of your practice time, and we recommend the three steps below.

For extra tips and resources, take a look at our system design interview prep guide and our list of 19 system design interview tips from ex-interviewers.

3.1 Learn the concepts

There is a base level of knowledge required to be able to speak intelligently about system design. You don't need to know EVERYTHING about sharding, load balancing, queues, etc. 

However, you will need to understand the high-level function of typical system components. You'll also want to know how these components relate to each other, and any relevant industry standards or major tradeoffs. 

To help you get the foundational knowledge you need, we've put together a series of 9 system design concept guides. Here's the full list:

  1. Network protocols and proxies, which make it possible for any networked computers to talk to each other, no matter where they are or what hardware or software they’re running.
  2. Databases, integral components of the world’s biggest technology systems.
  3. Latency, throughput, and availability, three common metrics for measuring system performance.
  4. Load balancing, the process of distributing tasks over a set of computing nodes to improve the performance and reliability of the system.
  5. Leader election algorithms, which describe how a cluster of nodes without a leader can communicate with each other to choose exactly one of themselves to become the leader. 
  6. Caching, a technique that stores copies of frequently used application data in a layer of smaller, faster memory in order to compute costs and to improve data retrieval times and throughput.
  7. Sharding, the horizontal scaling of a database system that is accomplished by breaking the database up into smaller “shards,” which are separate database servers that all contain a subset of the overall dataset.
  8. Polling, SSE, and WebSockets, techniques for streaming high volumes of data to or from a server.

We’d encourage you to begin by studying these topics, and once you understand the basics, you can begin practicing system design questions.

3.2 Work through system design interview questions

As you likely noticed in section 1, we recommend using a repeatable answer framework when answering system design interview questions. You can learn more about that framework here, but in the meantime, here is a summary:

Step 1: Ask clarifying questions

First, spend about five minutes checking in with your interviewer about the functional and non-functional requirements of what you’re going to design. Ask about the system’s goals and how they will be measured. Be sure that you fully understand the question before moving forward.

Call out any assumptions you’re making that will influence your design approach. If applicable, ask about non-functional requirements such as availability, consistency, scalability, etc.

Step 2: Design high-level

Start the high-level design by specifying one to two metrics (e.g. number of users added, products sold before vs after a feature launch, etc.). Then use these metrics to do some simple calculations in order to find the optimal usage pool of the system.

Once you’ve defined your metrics, map out only the most functional components of the system (e.g. front end, web server, database, etc.).

Finally, before getting into the more detailed aspects of your system, make some decisions on how you will design its database. Choose whether it will be a relational or a no-SQL database, as well as its metadata and table structure.

Step 3: Drill down on your design

If you haven’t already, start mapping out the system on your whiteboard. Speak through your diagram so that your interviewer is able to follow along and ask questions when necessary.

Consider any bottlenecks that may arise when it comes to the system’s scalability, performance, or flexibility.

To finalize your design, play to your strengths by choosing a component you’re more familiar with and drilling down on it. If you’re not sure which component would be best to explore, ask your interviewer.

Step 4: Bring it all together

Before wrapping up the round, take about five minutes to re-examine what you’ve designed. Does it meet the objectives you laid out with the interviewer at the beginning of the session? It is okay to change some components at this stage if you think it will improve the system, but you must explain to the interviewer what you are doing and why.

Apply this framework to practice questions like those we’ve included in sections 1 and 2 of this article. Use it on different types of questions in a variety of subjects, so that you learn how to adapt it to different situations and respond to unpredictable questions on the fly.

3.3 Practice with mock interviews

The first step is always to practice by yourself, as we touched on above. Once you’ve got the framework down, start interviewing yourself out loud as you practice. Play both the role of the interviewer and the candidate, asking and answering questions. This will help you develop your communication skills and your process for breaking down problems.

3.3.1 Practice with peers

Once you've done some individual practice, we would also strongly recommend that you practice solving system design questions with a peer interviewing you.

A great place to start is to practice with friends or family if you can. This can help you get some preliminary feedback on your approach, which will be especially helpful if your partner is familiar with system design interviews. 

If you don't have anyone in your network who can interview you, then you might want to check out our system design mock interview peer group, where you can set up practice interviews with other candidates. 

3.3.2 Practice with ex-interviewers

Practicing with peers can be a great help, and it's usually free. But at some point, you'll start noticing that the feedback you are getting from peers isn't helping you that much anymore. Once you reach that stage, we recommend practicing with ex-interviewers from top tech companies.

If you know someone who has experience running interviews at Facebook, Google, or another big tech company, then that's fantastic. But for most of us, it's tough to find the right connections to make this happen. 

Here's the good news. We've already made the connections for you. We’ve created a coaching service where you can practice system design interviews 1-on-1 with ex-interviewers from leading tech companies. Learn more and start scheduling sessions today.

cta_illustration arrow_left Browse FAANG ex-interviewers