55 Real FAANG Systems From First Principles

Build and Design Real Systems

All 55 end-to-end production systems asked by top tech companies, dissected into trade-offs, architecture patterns, and vetted solutions.

Company:
Tier:
Showing 55 of 55 systems
  1. #1
    Design a URL Shortening service like TinyURL
    How do you generate a unique short ID? How do you avoid collisions?
    GoogleFacebookAmazonMicrosoft
    Easy4 solutions
  2. #2
    Design Pastebin
    How do you handle large paste sizes? (Limit size per paste, chunk storage if needed) How do you support expiration of pastes? (TTL in DB, background cleanup jobs)
    AmazonVantaNutanix
    Easy3 solutions
  3. #3
    Design Instagram
    How do you store billions of photos and videos reliably? How do you ensure efficient retrieval when scrolling through a feed?
    FacebookMicrosoftTwitterAmazon
    Easy4 solutions
  4. #4
    Design Dropbox or Google Drive
    How to partition data and scale it? How to structure data as folders and files?
    DropboxFacebookGoogleAmazon
    Medium2 solutions
  5. #5
    Design Facebook Messenger or WhatsApp
    How do you ensure low-latency message delivery (< 100ms) across millions of users? What communication protocol will you use (long polling, WebSockets)?
    FacebookUberTikTokAmazon
    Medium4 solutions
  6. #6
    Design Twitter for millions of users
    What data will you store for each tweet? (tweet ID, user ID, timestamp, text, media link, etc.) How will you design for billions of tweets, millions of users, and high fan-out (e.g., celebrities with millions of followers)?
    UberCoupang
    Easy3 solutions
  7. #7
    Design Youtube or Netflix
    How would you design the video upload pipeline - how is the video received, stored, and encoded into multiple resolutions? How do you store videos? Object store like S3 or HDFS?
    FacebookAmazonSnowflakeWealthfront
    Medium2 solutions
  8. #8
    Design Typeahead Suggestion/Autocomplete
    How will you store queries to support prefix-based lookup? What data structure will you use for fast suggestions (Trie, inverted index, etc)? How will you keep it memory-efficient?
    FacebookGoogleExpediaBloomberg
    Hard3 solutions
  9. #9
    Design an API Rate Limiter
    How to identify users to rate limit? What algorithm do you use for rate limiting?
    AmazonAtlassianUberPatreon
    Hardwith code5 solutions
  10. #10
    Design a Distributed Metrics Logging and Aggregation System
    Let's assume the logs are generated from a distributed system, e.g, an EC2 compute cluster. How to collect logs efficiently from distributed systems?
    GoogleFacebookAmazoneBay
    Very Hard4 solutions
  11. #11
    Design a Distributed Stream Processing System like Kafka
    Go over how Kafka might be designed. What is the difference between Kafka and RabbitMQ?
    AmazonMicrosoftWiseConfluent
    Very Hard4 solutions
  12. #12
    Design a Key-Value Store
    How will you distribute the data via partitioning? How will you make sure the data is not lost (replication)?
    AppleGoogleCanvaAvalara
    Medium3 solutions
  13. #13
    Identify the K Most Shared Articles in Various Time Windows (24 hours, 1 hour, 5 minutes)
    At its core - what algorithm would you use? Count Min Sketch? or some other? How will you ensure that each new update (share) is fast?
    LinkedInFacebookTwitter
    Hard5 solutions
  14. #14
    Design Web Crawler
    Should it be real-time or periodic? How do you handle URL deduplication?
    AmazonGoogleFacebookAtlassian
    Medium1 solutions
  15. #15
    Design Facebook's News Feed
    How will you handle fanout: push model, pull model, or hybrid? How does the system change for a user with millions of friends/followers? How will you fetch and score new content at scale - especially when a user opens the app after days?
    Facebook
    Medium1 solutions
  16. #16
    Design Yelp or Nearby Friends
    How will you store location data? Will you use latitude-longitude, geohashing, or a spatial index (e.g., R-Tree, QuadTree)? How do you handle different types of proximity services - static (e.g., restaurants) vs dynamic (e.g., nearby friends or riders)?
    AmazonFacebookGoogleUber
    Very Hard4 solutions
  17. #17
    System to Collect Performance Metrics from Thousands of Servers
    What kind of metrics will you pull from the servers? How do you fetch metrics? Do you use push or pull?
    GoogleDatadogAmazoneBay
    Hard2 solutions
  18. #18
    Design Google Calendar
    Backend: How to structure the data? How to query free times in SQL? How would you store recurring events? Frontend: How will you structure the Calendar UI? When you add a new event, how does the UI show the change?
    GoogleLinkedIn
    Medium4 solutions
  19. #19
    Design a Distributed Queue like RabbitMQ
    How do you deal with high throughput? When would you use a queue vs a pub-sub system?
    AmazonAppleInstacart
    Hardwith code4 solutions
  20. #20
    Design Google Analytics - User Analytics Dashboard and Pipeline
    How do you collect and present real time data? How will you ensure that all user visits are being transmitted?
    MicrosoftFacebookQualtricsGoogle
    Hard3 solutions
  21. #21
    Design a System for Sorting Large Data Sets
    How much data do we need to sort? What kind of machines do we have at our disposal?
    GoogleMicrosoft
    Easy3 solutions
  22. #22
    Top K Elements: App Store Rankings, Amazon Bestsellers, etc.
    What data structure will you use to rank items? How real-time is the ranking?
    AmazonBloombergFacebookPinterest
    Easy4 solutions
  23. #23
    Design a Job Scheduler
    How will you do this on a single machine first? How will you schedule jobs and execute them at the right time?
    GoogleAmazonMicrosoftDoordash
    Easy4 solutions
  24. #24
    Design a Notification Service at Scale
    What channels to support? How to capture notifications - what are the sources?
    GooglePinterestOCIStubhub
    Hard4 solutions
  25. #25
    Surge Pricing System: Uber - Stream Processing, etc.
    How to you decide when surge pricing is needed? How do you calculate the pricing?
    UberLyft
    Very Hard2 solutions
  26. #26
    Netflix: Limit the Number of Screens Each User Can Watch
    How do you identify each device? Once you do, how do you keep track of the number of users watching it?
    Some FAANG
    Hard0 solutions
  27. #27
    Design an ETA Service and Location Sharing Between Driver and Rider
    How can you utilize past rides data for calculating the ETA? How can you estimate an ETA directly from maps data?
    UberSome FAANG
    Very Hard2 solutions
  28. #28
    Design a Hotel Booking System: Room Availability, Reservation, Booking
    This is more high level than most distributed systems questions. Database design - first come up with the features and then design the DB.
    AmazonSquareBooking.com
    Medium5 solutions
  29. #29
    Design an A/B Testing System (like Optimizely)
    How will you store and retrieve different treatment UI? How will you measure the success metrics for each treatment?
    AffirmSome FAANG
    Hard3 solutions
  30. #30
    Design a Price Alert System for Amazon (or for Stock prices)
    How will you scrape the data, if there is no API? What constitutes a price alert? Are there any rules a user can add - rule based alerts?
    FacebookBloombergCoinbaseSwyftx
    Easy3 solutions
  31. #31
    Design an IoC/Dependency Injection Framework
    How will you handle circular dependencies? How will your framework handle multithreading?
    ADPSome FAANG
    Very Hard3 solutions
  32. #32
    Design a Credit Card Processing System
    To clarify: what level are we implementing. For e.g, are we using Stripe? How will you handle the case where the payment is successful, how will you mark the payment as completed?
    StripePaytmPaypalDatabricks
    Very Hard3 solutions
  33. #33
    Count Facebook Likes, Especially for High-Profile Users
    To clarify: what scale are we looking at - what can the peak traffic be? This is a distributed counters problem - how will you scale it as the likes grow?
    FacebookAmazonTwitter
    Medium3 solutions
  34. #34
    Design a Control Plane for a Distributed Database
    What are the core functionalities of your DB's control plane? E.g, provisioning, configuration management, monitoring, scaling, backups, etc. How does your DB manage creating and managing new tables?
    Netflix
    Very Hard2 solutions
  35. #35
    Design a User Login and Authentication System for a Website
    What methods do you use to authenticate? How do you verify a user's credentials in the backend?
    GoogleVisaGusto
    Medium4 solutions
  36. #36
    Develop a Weather Application
    How is data ingested - there are two versions of this question: via an API, and via sensors. How often do you collect data via API? If you have sensors, how do you handle real-time data?
    AmazonChimeFacebookHubspot
    Easy3 solutions
  37. #37
    Create a Document Management System like Wikipedia, Notion or Google Docs
    Note: this question is without real-time editing. How will you store each document? What will the URLs look like?
    GoogleFlipkartNotionAmazon
    Easy3 solutions
  38. #38
    Build a Marketplace Feature for Facebook
    How will you store and retrieve listings? How will you show listings based on location?
    FacebookRoblox
    Easy3 solutions
  39. #39
    Design a System to Monitor the Health of a Cluster
    What metrics will you track for health? How will you collect those metrics? Will you utilize a heartbeat?
    UberLaceworkAmazonGoogle
    Medium2 solutions
  40. #40
    Find a Rider for Uber or Uber Eats
    Very similar to Proximity Service (Find Nearby Friends). This problem is about maintaining a large geospatial index. How do you maintain a geospatial index of drivers?
    FacebookUberGoogleMicrosoft
    Hard4 solutions
  41. #41
    Design a Distributed Tracing System
    How will you collect information from various parts of your backend? Where will you send the info and how will you store it?
    UberAmazon
    Very Hard4 solutions
  42. #42
    Design Backend for an App to Distribute 6 Million Free Burgers in One Hour
    How is the food delivered? Email notification? How do you store the number of vouchers left?
    GoogleDeliveroo
    Medium3 solutions
  43. #43
    Design a File Downloader Library from Frontend to Backend
    Backend: What does the API look like? How do you do this at scale?
    Facebook
    Hard2 solutions
  44. #44
    Design a System to View Latest Stock Prices Worldwide
    How will you ingest real time data? How will you store the data, if you need to display a graph?
    GoogleBloombergAmazon
    Easy3 solutions
  45. #45
    Develop a Photo Sharing Platform like Flickr or Google Photos
    Similar to Design Instagram. How will you store a large number of photos?
    GoogleDoordashAmazonUber
    Medium4 solutions
  46. #46
    Design an On-Call Escalation System
    Question Description: Design an On-call Escalation System. The levels of employees handling oncall - Developer, Manager and Director. Initial ticket always goes to a developer. If a developer is not able to handle the ticket or no developer is available, ticket gets escalated to a manager. Similarly, if no manager is available or a manager is not able to resolve the ticket, it gets escalated to director. If no one is available to take the ticket, it goes into a pending queue.
    Uber
    Medium1 solutions
  47. #47
    Design and Implement a Wire Transfer API
    Similar to Credit Card Processing System (Question 22), but with wire transfer. Assume that you are interacting with the banks instead of with the credit card provider. How will you hire concurrent transactions to the same account? Or from the same account?
    GoogleCapital OneRevolut
    Hardwith code2 solutions
  48. #48
    Design a Live Comments Feature for Facebook
    How will you push live comments to all users? How will you make sure new comments are delivered in real-time?
    Facebook
    Hard4 solutions
  49. #49
    Design a Feature to Show the Number of Users Viewing a Page
    Details from a candidate: What would be your main considerations when designing a system that lets users know about the number of other users currently viewing a page (e.g, a hotel/accommodation site)
    Booking.com
    Easy2 solutions
  50. #50
    Design Facebook Likes Feature with Live Updates
    Related to Question 23 (Design Facebook Likes), but with live updates as an addition. How will you push live updates to millions of users?
    FacebookCoinbase
    Easy1 solutions
  51. #51
    Create a System to Migrate Large Data to Google Cloud
    How will you structure the migration? Which machine manages it? How do we ensure no data is lost in the process?
    GoogleOCI
    Very Hard2 solutions
  52. #52
    Design a Distributed Botnet
    It is essentially the same as coordinating a bunch of machines towards doing a particular task, and tracking it. You can take the MapReduce template - master-workers, heartbeats for tracking tasks, etc.
    FacebookLyft
    Hard3 solutions
  53. #53
    Create a Distributed File Transfer System like Bittorrent
    How will you ensure that a file is hosted on the system reliably, even if one machine goes down? If a user wants to download a file, how do you locate the machine that holds it?
    GoogleAtlassianTwitch
    Hardwith code3 solutions
  54. #54
    Design a Parts Compatibility Feature for an eCommerce Site
    Description from candidate: I was asked to design a service for assembling a pc section of the Newegg website (the part that you can pick different parts of a pc to assemble it). The main requirement was that we needed a way to tell customer that different parts they picked are compatible. We have to keep track of each part's compatibility with other parts.
    Some FAANG
    Easy0 solutions
  55. #55
    Develop an Ads Management and Display System for a Social Feed
    How do you create an ad and display it in your feed? How do you run an auction?
    FacebookGoogleAmazonPinterest
    Very Hard2 solutions