Distributed System Design Interview Questions

What To Expect In System Design Interviews

  • Concurrency. Do you understand threads, deadlock, and starvation? Do you know how to parallelize algorithms? Do you understand consistency and coherence?
  • Networking. Do you roughly understand IPC and TCP/IP? Do you know the difference between throughput and latency, and when each is the relevant factor?
  • Abstraction. You should understand the systems you’re building upon. Do you know roughly how an OS, file system, and database work? Do you know about the various levels of caching in a modern OS?
  • Real-World Performance. You should be familiar with the speed of everything your computer can do, including the relative performance of RAM, disk, SSD and your network.
  • Estimation. Estimation, especially in the form of a back-of-the-envelope calculation, is important because it helps you narrow down the list of possible solutions to only the ones that are feasible. Then you have only a few prototypes or micro-benchmarks to write.
  • Availability and Reliability. Are you thinking about how things can fail, especially in a distributed environment? Do know how to design a system to cope with network failures? Do you understand durability?

Design a tinyurl system

Design a CDN network

Design a Google document system

Design a random ID generation system

Design a key-value database

Design the Facebook news feed function

Design the Facebook timeline function

Design a function to return the top k requests during past time interval

Design an online multiplayer card game

Design a graph search function

Design a picture sharing system

Design a search engine

Design a recommendition system

Design a garbage collection system

Design a scalable web crawling system

Design the chat function

Design a trending topic system

Design a cache system

Other Questions

  • Design a URL shortening service.
  • How would you design the feature in LinkedIn where it computes how many hops there are between you and another person?
  • If you were to design a web platform for online chess games, how would you do that?
  • Design an ID allocator which can allocate and de-allocate from a range of 1-1,000,000
  • Design and implement a web crawler(single and multi-threaded)

Value Increment


The most straight forward way

Long value;

  • Thread-safe? -No.

AtomicLong / addAndGet()

  • Thread-safe? -Safe
  • Network failure? -Not safe

    • Double increments: receiver received increment request, performed increment; sender got timeout or network failure, resend the request


Use a streaming solution like Spark Streaming: store counts in an RDD that can be incremented in a reduce process.


Grokking the System Design Interview https://www.educative.io/collection/5668639101419520/5649050225344512 https://www.interviewbit.com/problems/search-typeahead/ type ahead: https://www.facebook.com/notes/facebook-engineering/the-life-of-a-typeahead-query/389105248919/