Distributed Systems Interview Questions 2026
83 Distributed Systems interview questions from Amazon, Swiggy, Meta, Razorpay. All difficulty levels, all roles. Upvoted by engineers who were asked them.
Distributed Systems Questions by Company
Amazon (3)
Design a distributed rate limiter that can handle 10M requests per second across multiple data centers. Discuss consistency tradeoffs, the choice between token bucket vs leaky bucket, and how you would handle clock skew across regions.
Design Amazon's recommendation engine (customers who bought X also bought Y). Cover: collaborative filtering vs content-based, item-item similarity at scale, real-time vs batch computation, and how you handle the cold-start problem for new products.
Design a notification system (push/email/SMS) that sends 10 million notifications per day to users across time zones with delivery guarantees.
Swiggy (3)
Design Swiggy's real-time order tracking system. A customer should see their delivery agent's location update every 5 seconds on a map. Cover: location ingestion from agents, WebSocket vs SSE for pushing updates to clients, data store choices, and how you scale to 100k concurrent orders during peak hours.
Design Swiggy's restaurant search and ranking system. How do you index 200k restaurants? Discuss full-text search (Elasticsearch), geospatial filtering, personalised ranking signals (past orders, ratings, delivery time), and how to refresh the index when a restaurant updates its menu.
Design Swiggy's delivery partner assignment algorithm. When an order is placed, how do you assign the optimal nearby delivery partner within 2 minutes considering distance, current load, and restaurant prep time?
Meta (8)
Design Facebook's News Feed ranking system. How do you score posts from thousands of friends and pages? Cover: candidate generation, feature extraction, ML ranking model, how you handle near-real-time freshness, and edge vs server-side ranking for mobile clients.
Given Meta's social graph, find all friend-of-friend recommendations for a user that are not already friends. Discuss BFS at scale, how to prune the search space, and how to rank recommendations by mutual friend count efficiently.
Design Facebook Live - a system to stream live video from one user to potentially millions of concurrent viewers with low latency. Cover: ingest pipeline, transcoding, CDN edge caching, adaptive bitrate, and how you handle a celebrity going live.
Design WhatsApp's end-to-end encrypted messaging system. How do you exchange keys, store messages server-side without reading them, and handle multi-device sync? Cover the Signal Protocol basics.
Design Instagram Stories. A story disappears after 24 hours and is shown in a ring around profile pictures. Cover: upload pipeline, storage with TTL, efficient delivery to followers, and view count tracking at scale.
Design Instagram feed — a user follows 500 people, each posts 2-3 times daily. How do you generate and serve a personalized, ranked feed at scale?
Design the "who viewed your profile" feature for a professional network with 500M users. Discuss write amplification, retention policy, and privacy controls for who can see the data.
Given a social graph, find the shortest chain of mutual connections between two users (like LinkedIn's "degrees of connection"), and explain how bidirectional BFS improves performance over a single-direction BFS at this scale.
Razorpay (2)
Design Razorpay's payment retry system. When a payment fails due to a transient error (bank timeout, network blip), how do you retry safely without double-charging the customer? Cover: idempotency keys, exponential backoff with jitter, dead-letter queues, and reconciliation with bank statements.
Explain the difference between a payment gateway, payment processor, and acquiring bank. How does money actually move when a customer pays with a credit card on a Razorpay-powered checkout? Walk through each hop end to end.
PhonePe (3)
Design PhonePe's UPI transaction system to handle 1 billion transactions per day. Cover: request routing to the correct bank, NPCI integration, handling duplicate transactions, consistency vs availability trade-offs, and how you build a reliable audit trail for regulatory compliance.
Design PhonePe's switch - the internal routing layer that forwards UPI requests to the correct bank. It must be highly available (99.999%), handle 50k TPS, and complete each request within 30 seconds (NPCI timeout). Cover: circuit breakers, retries, and bank-specific timeouts.
What is eventual consistency and why is it acceptable for some PhonePe features but not others? Give examples: where strong consistency is mandatory (debit/credit) vs where eventual consistency is fine (notification delivery, analytics).
Paytm (1)
Design Paytm's wallet system that supports deposits, withdrawals, peer-to-peer transfers, and merchant payments. Ensure ACID properties for all transfers, discuss optimistic vs pessimistic locking, and explain how you handle a split-brain scenario where two nodes disagree on a wallet balance.
LinkedIn (6)
Design LinkedIn's "People You May Know" feature. How do you compute second and third-degree connections for 900 million users efficiently? Discuss graph storage (adjacency list vs matrix), batch vs real-time computation, and how to refresh recommendations when someone adds a new connection.
Design LinkedIn's job recommendation engine. Given a user's profile, skills, and activity, rank the most relevant open positions. Cover candidate retrieval, feature engineering (skills overlap, company affinity, recency), and how you A/B test ranking changes at scale.
Design LinkedIn's feed. Each user sees posts from their connections, pages they follow, and sponsored content. Posts must be ranked by relevance. Cover: fan-out-on-write vs fan-out-on-read, feed generation for users with 30k connections, and freshness.
LinkedIn uses Kafka extensively. Explain how you would design the Kafka topic structure for LinkedIn's activity events (profile view, connection request, message sent). Cover: topic naming, partitioning strategy, consumer group design, and exactly-once semantics.
Design LinkedIn's InMail spam filtering system. Premium users can message strangers. How do you detect and block spam campaigns while allowing legitimate cold outreach? Cover: sender reputation, content analysis, and feedback loops.
Design the news feed ranking pipeline for a professional network. How do you balance freshness, relevance, and diversity of content sources without the feed feeling stale or repetitive?
Atlassian (3)
Design Jira's real-time collaborative issue editor (multiple teammates editing the same ticket simultaneously). Cover: Operational Transformation vs CRDTs, conflict resolution, last-write-wins vs merge, and how you persist the final state while keeping latency low for users on slow connections.
Design Confluence's page version history. Every edit creates a new version. Users can view any historical version and restore it. Cover: delta vs full-snapshot storage, efficient diff computation, and how you handle concurrent edits creating a branch.
Design Bitbucket's code review system (Pull Requests). Multiple reviewers comment on specific lines of code. The PR is mergeable when all reviewers approve. Cover: diff computation, inline comments anchored to code lines, and what happens when new commits invalidate existing comments.
Uber (7)
Design Uber's driver-rider matching system. How do you match the nearest available driver to a rider within 200ms at global scale? Cover: geospatial indexing (H3/S2), the dispatch algorithm, how you handle supply-demand imbalances, and what happens when a matched driver rejects the trip.
Design Uber's dynamic pricing (surge) system. When supply is low and demand is high in a geofenced zone, prices increase automatically. Explain the data pipeline, the pricing model, how you prevent oscillations (price going up → drivers rush in → price drops → drivers leave), and regulatory constraints.
Design Uber Eats' order batching system. A single delivery partner picks up orders from multiple nearby restaurants and delivers to multiple customers in one trip. How do you optimise the route and assignment?
Uber uses H3 hexagonal geospatial indexing. Explain why hexagons are better than squares or lat/lng grids for proximity searches. How do you find all drivers within 2km of a rider using H3 resolution levels?
Design Uber's payment reconciliation system. Uber collects payments in 70+ countries with different currencies, payment methods, and regulations. How do you reconcile driver payouts against rider charges and detect discrepancies?
Design the rider-driver matching system for a ride-hailing app. How would you balance minimizing rider wait time against fairness in driver earnings distribution?
Trip fares are occasionally being calculated twice, double-charging riders. The fare calculation service is stateless and horizontally scaled behind a queue. Where would you look first, and what's the likely root cause?
Stripe (6)
Design Stripe's webhook delivery system. Stripe sends millions of webhooks per day to customer endpoints that can be slow, down, or buggy. Cover: at-least-once delivery guarantees, retry with exponential backoff, ordering guarantees (or lack thereof), how to handle a customer endpoint that is down for 24h, and the dead-letter strategy.
Explain how Stripe handles exactly-once payment processing. A customer clicks "Pay" twice in quick succession. How does Stripe prevent double-charging? Walk through idempotency keys in the API, database-level constraints, and how the client should handle the case where the first request times out.
Design Stripe's fraud detection system. For every payment, you must decide accept/decline in under 100ms using hundreds of signals. Cover: feature engineering, real-time ML scoring, rule engine, and how you minimise false positives (declined legitimate payments).
Explain PCI-DSS compliance requirements for handling card data. What is tokenisation? How does Stripe use it to ensure raw card numbers never touch customer servers? What are the implications for your API design?
Design Stripe's subscription billing system (Stripe Billing). Customers are charged on recurring intervals (monthly/annual) in different currencies, with proration for plan upgrades. Cover: invoice generation, dunning for failed payments, and SCA (Strong Customer Authentication) compliance.
Design a distributed rate limiter that works across 100 API servers. A user is allowed 1000 requests per minute.
Salesforce (3)
Design a multi-tenant SaaS database architecture like Salesforce's. Thousands of enterprise customers share the same infrastructure but must never see each other's data. Compare silo (one DB per tenant), pool (shared DB, tenant_id column), and bridge models. Discuss query performance, schema customisation, and compliance isolation.
Design Salesforce's governor limits enforcement system. Every Apex code execution is limited (SOQL queries, CPU time, heap). How do you track and enforce these limits in real time across millions of concurrent org executions?
Design Salesforce Flow (visual process automation). Users define business workflows (if-then rules, send emails, create records) in a UI. How do you store, version, execute, and debug millions of active flows in a multi-tenant environment?
Oracle (3)
Design a distributed SQL database that supports ACID transactions across shards. Explain two-phase commit (2PC), its failure modes, and how Google Spanner uses TrueTime to replace 2PC with a more scalable approach.
Design Oracle Cloud's IAM (Identity and Access Management) system. Thousands of customers, each with their own users, groups, and policies. How do you evaluate a permission check in under 10ms for every API call?
Explain Oracle RAC (Real Application Clusters). How do multiple nodes access the same database storage? What is the Cache Fusion protocol? When would you choose RAC over a primary-replica setup?
Adobe (2)
Design Adobe's document collaboration system (similar to Google Docs for PDFs). Multiple users can annotate and comment on a PDF simultaneously. Cover: conflict-free annotation merging, storing annotation deltas vs full snapshots, real-time sync via WebSockets, and how you export the final annotated PDF.
Design Adobe Experience Cloud's customer data platform. Unify customer profiles from website visits, email clicks, and CRM data across devices and sessions. Cover identity resolution (same person on mobile and desktop), real-time segment computation, and privacy (GDPR right-to-erasure).
Apple (5)
Design iCloud Photo Library — 2 billion photos synced across iPhone, iPad, and Mac. Cover: deduplication (perceptual hashing), delta sync (only changed chunks), offline-first with conflict resolution, and privacy — how Apple performs server-side processing without seeing unencrypted photos.
Design Apple Pay's tap-to-pay system. When a user taps their iPhone, a payment must complete in under 500ms even with no internet connection. Cover: secure element, tokenisation, NFC protocol, and offline authorisation.
Design Siri's speech recognition pipeline. Audio is captured on-device, processed, and a response is returned. How do you split on-device vs server processing to balance latency, privacy, and accuracy?
Design an offline-first note-taking app that syncs across a phone, tablet, and laptop, resolving conflicts when the same note was edited on two devices while offline.
Two data centers each think they're the primary for a user's data after a network partition heals — a classic split-brain. How would you design the system to detect and resolve this safely?
Netflix (8)
Design Netflix's video recommendation system. Netflix serves 250 million subscribers. How do you generate personalised top-10 rows for each user in real time? Cover: collaborative filtering, content-based signals, contextual signals (time of day, device), and how you handle the cold-start problem for new users.
Design Netflix's adaptive bitrate streaming (ABR) system. How does the client decide which video quality to stream second by second based on available bandwidth? Explain DASH vs HLS, the segment request pipeline, buffer-based rate adaptation algorithms, and CDN architecture.
Design Netflix's content delivery pipeline. A new movie is added. Walk through transcoding into 50+ formats, uploading to CDN edge nodes globally, and ensuring playback starts within 200ms for any device anywhere.
Explain Netflix's Chaos Engineering philosophy and the Simian Army. How do you design a system to be resilient to random instance failures, network partitions, and zone outages? Give a concrete example.
Design Netflix's A/B testing platform. Engineers run 100+ experiments simultaneously on different features. How do you assign users to buckets consistently, collect metrics, measure statistical significance, and avoid interaction effects?
What is the circuit breaker pattern? Explain the three states (Closed, Open, Half-Open), when to trip and reset the breaker, and how Netflix's Hystrix library implements it. When would you NOT use a circuit breaker?
Design the video encoding pipeline that takes a raw uploaded file and produces multiple bitrate/resolution variants for adaptive streaming. How do you make this fault-tolerant and cost-efficient at scale?
Netflix popularized "chaos engineering" — explain what problem it actually solves that traditional testing doesn't, and how you would introduce it safely into a system that has never done it before.
Airbnb (5)
Design Airbnb's search and availability system. A guest searches for "Paris, 3 nights, 2 guests" and sees ranked listings. Cover: availability calendar storage, real-time inventory updates (when host blocks dates), geospatial search, ranking signals (price, reviews, Superhost status), and how you handle the thundering herd on popular dates.
Design Airbnb's trust and safety system. How do you detect fraudulent listings, scam messages, and fake reviews at scale without blocking legitimate hosts and guests?
How does Airbnb's dynamic pricing work? Given historical booking data, seasonality, local events, and competitor prices, how do you recommend a nightly rate that maximises host revenue? Discuss the ML pipeline.
Design Airbnb's host payout system. Hosts in 220+ countries receive payouts in local currency via bank transfer, PayPal, or Payoneer. Cover: currency conversion, scheduled payouts, failed payout handling, and tax compliance.
Design the booking system for a home-rental marketplace, ensuring two guests can never double-book the same property for overlapping dates under concurrent requests.
Google (6)
Design Google Search autocomplete. As a user types "wea", suggest "weather", "weather today", "weather London". Cover: trie vs inverted index, personalisation, freshness, latency budget (<100ms), and how you handle offensive query suggestions.
Design Google Maps ETA calculation. How do you compute the fastest route for 1B+ users in real time? Cover: graph representation of road network, Dijkstra vs A* vs Contraction Hierarchies, live traffic data ingestion, and how you handle road closures.
Design Bigtable or a wide-column store from scratch. Explain SSTable, memtable, compaction strategies (size-tiered vs levelled), bloom filters for read optimisation, and how you handle tombstones for deletes.
Design a URL shortening service (like bit.ly) that handles 1 billion shortened URLs and 100K redirects per second.
Design an autocomplete/typeahead system for a search engine handling 100K queries per second. Discuss the trie-based approach, how you would rank suggestions, and how you would keep the trie updated with trending queries without hurting read latency.
Design a URL shortener that must handle 100M new URLs per day and 10x that in reads. Walk through your ID generation strategy and why a simple auto-increment counter breaks at this scale.
Microsoft (3)
Design Azure Blob Storage. How do you store, replicate, and serve petabytes of unstructured data with 11 nines of durability? Cover: chunking, erasure coding vs 3-way replication, geo-redundancy, and handling hot blobs.
Design a collaborative code editor like VS Code Live Share. Multiple developers edit the same file simultaneously with cursors visible to all. Cover: OT vs CRDT, undo/redo in a collaborative context, and low-latency sync across regions.
Design the "presence" feature in Teams/Slack — showing whether a user is online, away, or in a meeting — that scales to tens of millions of concurrent users with near real-time updates.
Flipkart (1)
Design Flipkart's order management system. From "Place Order" to "Delivered", walk through every state transition, the microservices involved, how you handle partial failures (payment succeeds but inventory deduct fails), and eventual consistency.
Zomato (1)
Design Zomato's delivery time prediction system. Before placing an order, show "Delivers in 35 minutes". The estimate must account for restaurant preparation time, distance, traffic, and number of parallel orders the partner is handling.
Lyft (1)
Design a ride-sharing location tracking system. 10 million drivers update their GPS location every 5 seconds. How do you store and query nearby drivers efficiently?
LTIMindtree (2)
If data volume increases significantly, how would you modify your service architecture?
If an entire zone becomes unavailable, how would you ensure no data loss?
Grab (1)
Design the driver-passenger matching system for a ride-hailing app operating across Southeast Asia, where network connectivity is inconsistent in parts of the region. How does that constraint change your design versus a similar system in a market with reliable connectivity?
Practice these questions with AI feedback
Get instant grading on your answers, identify your weak areas, and generate a personalised 14-day study plan — all free.
Build my study plan →