CARVIEW |
Beginner
10h
Updated 4 months ago
Meta System Design Interview Questions
WHAT YOU'LL LEARN
Show more
Content
2.
Introduction
2 Lessons
3.
Abstractions
4 Lessons
4.
Non-functional System Characteristics
6 Lessons
5.
Back-of-the-envelope Calculations
2 Lessons
6.
Building Blocks
1 Lessons
7.
Domain Name System
2 Lessons
8.
Load Balancers
3 Lessons
9.
Databases
5 Lessons
10.
Key-value Store
5 Lessons
11.
Content Delivery Network (CDN)
7 Lessons
12.
Sequencer
3 Lessons
13.
Distributed Monitoring
3 Lessons
14.
Monitor Server-side Errors
3 Lessons
15.
Monitor Client-side Errors
2 Lessons
16.
Distributed Cache
6 Lessons
17.
Distributed Messaging Queue
7 Lessons
18.
Pub-sub
3 Lessons
19.
Rate Limiter
5 Lessons
20.
Blob Store
6 Lessons
21.
Distributed Search
6 Lessons
22.
Distributed Logging
3 Lessons
23.
Distributed Task Scheduler
5 Lessons
24.
Sharded Counters
4 Lessons
25.
Concluding the Building Blocks Discussion
4 Lessons
26.
Design YouTube
6 Lessons
27.
Design Quora
5 Lessons
28.
Design Google Maps
6 Lessons
29.
Design a Proximity Service / Yelp
5 Lessons
30.
Design Uber
7 Lessons
31.
Design Twitter
6 Lessons
32.
Design Newsfeed System
4 Lessons
33.
Design Instagram
5 Lessons
34.
Design a URL Shortening Service / TinyURL
6 Lessons
35.
Design a Web Crawler
5 Lessons
36.
Design WhatsApp
6 Lessons
37.
Design Typeahead Suggestion
7 Lessons
38.
Design a Collaborative Document Editing Service / Google Docs
5 Lessons
39.
Spectacular Failures
4 Lessons
40.
Concluding Remarks
2 Lessons
Trusted by 2.8 million developers working at companies
Anthony Walker
@_webarchitect_
Evan Dunbar
ML Engineer
Software Developer
Carlos Matias La Borde
Souvik Kundu
Front-end Developer
Vinay Krishnaiah
Software Developer
See how Educative uses AI to make your learning more immersive than ever before.
AI Prompt
Code Feedback
Explain with AI
AI Code Mentor
Free Resources
Frequently Asked Questions
How would you design Instagram Stories or Instagram’s Newsfeed?
Both features must deliver personalized, real-time content to millions of users with low latency. Stories are ephemeral (visible for 24 hours), so you’d store them in a time-partitioned database with automatic expiry. Newsfeed requires ranking algorithms that blend recency, engagement signals, and personalization from past behavior. To reduce load, pre-compute ranked feeds in background jobs and cache them. Edge servers deliver content quickly, while scroll or swipe actions trigger background fetches for the next batch.
What’s the architecture for an API layer to Meta’s Chat?
The API layer must support real-time, bidirectional communication. Use WebSockets or a long-lived HTTP/2 connection to keep latency low. The API should handle message delivery guarantees (at least once), message ordering, and typing indicators. For scalability, shard user conversations and use a publish-subscribe pattern to fan out messages to recipients. Include presence updates and delivery/read receipts, with all APIs gated by authentication and rate limiting.
How would you design Meta’s notification system?
A notification system must be event-driven, scalable, and user-personalized. When an event occurs (new comment, tag, friend request), an event producer sends it to a notification service via a message bus. The service applies business rules (priority, deduplication, user preferences) and queues the message for delivery via push, email, or in-app. Multi-device sync ensures that dismissing a notification on one device removes it everywhere.
What’s the approach to designing Meta’s recommendation system?
Recommendations, whether for friends, videos, or groups, are generated using hybrid algorithms: collaborative filtering for similarity, content-based filtering for relevance, and ranking models optimized via A/B testing. Data is processed in a feature store, with real-time updates from user actions. The system must support context-aware recommendations, factoring in time, location, and active trends, while enforcing diversity to avoid filter bubbles.
How would you design a real-time analytics system for ads?
Ad analytics must ingest billions of events daily and make them queryable within seconds. Events (impressions, clicks, conversions) flow into Kafka, are processed with Flink/Spark Streaming for aggregation, and land in a low-latency OLAP store like Druid or Pinot. Partition by advertiser and campaign to speed queries. Retain raw logs for audits and backfills, while exposing aggregated metrics to dashboards and APIs.
What’s the architecture for a live video streaming platform?
Live streaming at scale uses CDN edge delivery with adaptive bitrate streaming (HLS/DASH). The video is captured, transcoded into multiple bitrates, chunked, and distributed. A control channel handles chat, reactions, and viewer counts in real time. The system must minimize end-to-end latency while ensuring stability during audience spikes. For viral broadcasts, the CDN should dynamically replicate streams closer to demand hotspots.
How would you design Meta Live’s comments feature?
Live comments must handle thousands of messages per second. Use a pub-sub architecture where comments are published to a topic per live stream, and subscribed clients get updates instantly. To reduce bandwidth, batch messages or apply rate limits per user. Moderation filters run inline to block spam or abusive content before delivery. Clients may use sliding windows to show only recent comments for readability.
What’s the design for a content moderation system at scale?
Moderation combines automated filtering with human review. The pipeline starts with AI models detecting policy violations (hate speech, nudity, misinformation). Detected content is flagged and either auto-removed or queued for review. Use tiered queues for priority cases (e.g., viral posts). Maintain an audit trail for transparency. The system must support multiple languages, cultural contexts, and evolving policy rules.