Top 10 System Design Interview Questions for Software Engineers
Tags: career, programming, systemdesign, webdev
Published: 2017-09-13 21:06:59

---
title: Top 10 System Design Interview Questions for Software Engineers
published: true
description: Here are the most common questions asked during System Design Interview.
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6j64xwywx5huect64ilj.png
tags: career, programming, system design, web development
---

<sup>*Note: This post was originally published on [Hackernoon](https://hackernoon.com/top-10-system-design-interview-questions-for-software-engineers-8561290f0444).*<sup>

Designing Large Scale Distributed Systems has become the standard part of the software engineering interviews. Engineers struggle with System Design Interviews (SDIs), primarily because of the following two reasons:

1. Their lack of experience in developing large scale systems.
2. Unstructured nature of SDIs. Even engineers who’ve some experience building large systems aren’t comfortable with these interviews, mainly due to the open-ended nature of design problems that don’t have a standard answer.

Excellent performance in SDIs is highly rewarding since it reflects upon your ability to work with complex systems and translates into the position and compensation (salary & stocks) that the interviewing company will offer you.

> ***If you are looking for resources to prepare for System Design Interviews, take a look at [Grokking the System Design Interview](https://www.educative.io/courses/grokking-the-system-design-interview).***

At [Educative.io](https://www.educative.io), we’ve talked to hundreds of candidates who went through design interviews. As part of the process, we’ve compiled a list of most frequently asked System Design Interview Questions.
Following are the most frequently asked questions along with a few pointers to the things that interviewers want you to consider while designing the system.

## 1. Design TinyURL or bitly (a URL shortening service)

![Bitly + TinUrl logos](https://thepracticaldev.s3.amazonaws.com/i/uv8cujjwemxf1kg9b78a.png)

Given a (typically) long URL, how would how would you design service that would generate a shorter and unique alias for it?
Discuss things like:
* How to generate a unique ID for each URL?
* How would you generate unique IDs at scale (thousands of URL shortening requests coming every second)?
*How would your service handle redirects?
* How would you support custom short URLs?
* How to delete expired URLs etc.?
* How to track click stats?

## 2. Design YouTube, Netflix or Twitch (a global video streaming service)

![Youtube + Netflix + Twitch logos](https://thepracticaldev.s3.amazonaws.com/i/uhxico28g50e3lt5kjtp.png)

Videos mean that your service will be storing and transmitting petabytes and petabytes of data.You should discuss how to efficiently store and distribute data in away that a huge number of users can watch and share them simultaneously (e.g., imagine streaming the latest episode of a hit TV show like Games of Thrones).

Also, discuss:

* How would you record stats about videos, e.g., the total number of views, upvotes/downvotes, etc.
* How would a user add comments on videos (in real-time).

You can check out my previous post on ["How NOT to design Netflix in your 45-minute system design interview"](https://dev.to/fahimulhaq/how-not-to-design-netflix-in-your-45-minute-system-design-interview)

## 3. Design Facebook Messenger or WhatsApp (a global chat service)

![Facebook + WhatsApp logos](https://thepracticaldev.s3.amazonaws.com/i/0hhwlel4huedvzun9hbt.png)

Interviewers are interested in knowing:
* How would you design one-on-one conversations between users?
* How would you extend your design to support group chats?
* What to do when the user is not connected to the internet?
* When to send push notifications?
* Can you provide end-to-end encryption? How?

## 4. Designing Quora or Reddit or HackerNews (a social network + message board service)

![Quora + Reddit + Hackernews logos](https://thepracticaldev.s3.amazonaws.com/i/nzdgwixl6mzo76jrzu0k.png)

Users of the services can post questions or share links. Other users can answer questions or comment on the shared links. The service should be able to:

* Records stats for each answer, e.g., the total number of views, upvotes/downvotes, etc.
* Users should be able to follow other users or topics
* Their timeline will consist of top questions from all the users and topics they follow (similar to news feed generation).

## 5. Design Dropbox or Google Drive or Google Photos (a global file storage & sharing service)

![Dropbox + Google Drive + Google Photos logs](https://thepracticaldev.s3.amazonaws.com/i/t4j9jt3z6aq3nw8dw8sr.png)

Discuss things like:
* How would users be able to upload/view/search/share files or photos?
* How would you track permissions for file sharing
* How would you allow multiple users to edit the same document

## 6. Design Facebook, Twitter or Instagram (a social media service with hundreds of millions of users)

![Facebook + Twitter + Instragram logos] (https://thepracticaldev.s3.amazonaws.com/i/620wuupaf4yfm8xzqghd.png)

When designing a social media service with hundreds of million (or billions of users), interviewers are interested in knowing how would you design the following components

* Efficient storage and search for posts or tweets.
* Newsfeed generation
* Social Graph (who befriends whom or who follows whom — especially when millions of users are following a celebrity)

A lot of times, interviewers spend the whole interview discussing the design of the news feed.


## 7. Design Uber or Lyft (a ride sharing service)

![Uber + Lyft logos] (https://thepracticaldev.s3.amazonaws.com/i/52k8njw675wi62w3q8ud.png)

While designing a ride-sharing service, discuss things like:

* The most critical use case — when a customer requests a ride and how to efficiently match them with the nearby drivers?
* How to store millions of geographical locations for drivers and riders who are always moving.
* How to handle updates to driver/rider locations (millions of updates every second)?

##8. Design a Web Crawler or Type-Ahead (search engine related services)

![Google + Bing logos](https://thepracticaldev.s3.amazonaws.com/i/3sb49bhq4b2xx3fcyp2b.png)

For Type-Ahead, as the user types in their query, you need to design a service which would suggest top 10 searched terms starting with whatever the user has typed. Discuss things like:

* How to store previous search queries?
* How to keep the data fresh?
* How to find the best matches to the already typed string?
* How to handle updates, and the user is typing too fast?

For Web Crawler, we have to design a scalable service that can crawl the entire Web, and can fetch hundreds of millions of Web documents. Discuss things like:

* How to find new web pages?
* How to prioritize web pages that change dynamically?
* How to ensure that your crawler is not infinitely stuck on the same domain?

## 9. Design an API Rate Limiter (e.g., for Firebase or Github)

![Firebase + Github logs](https://thepracticaldev.s3.amazonaws.com/i/xhs4sxr601jgyfdwzpuu.png)

You are expected to develop a Rate Limiter services that can:

* Limit the number of requests an entity can send to an API within a time window, e.g., 15 requests per second.
* The rate limiting should work for a distributed setup, as the APIs are accessible through a cluster of servers.
* How would you handle throttling (soft and hard throttling etc.).

## 10. Design Yelp or Nearby Places/Friends (a proximity server)

![Yelp + Facebook Nearby logos](https://thepracticaldev.s3.amazonaws.com/i/w58um04fnhq3apu5gyhs.png)

This service would need to store locations for millions of people/places. Discuss things like:

* How would the users of the service be able to search nearby friends or places
* How to rank places (based on the distance, user reviews).
* How to efficiently store location data according to the population density (e.g., a block in New York City might have more places/people than a small city).

## **Interview Preparation Resources for Software engineers**

Following are some resources that can help you prepare for software engineering interviews.

1. **System Design Interviews:** [Grokking the System Design Interview](https://www.educative.io/courses/grokking-the-system-design-interview).
2. **Coding Interviews:** [Grokking the Coding Interview: Patterns for Coding Questions](https://www.educative.io/courses/grokking-the-coding-interview).
3. **Further readings:** [Anatomy of a System Design Interview](https://dev.to/fahimulhaq/anatomy-of-a-system-design-interview)

Happy interviewing!

---

*Fahim is the co-founder of [Educative](https://www.educative.io). We are building the next generation interactive learning platform for software engineers and instructors. Learners learn by going through interactive courses. Instructors can quickly create and publish interactive courses using our course builder. If you are interested in publishing courses or knowing more, feel free to reach out.*

**All product names, logos, and brands are the property of their respective owners.*