Big Tech - System Design Products
Here is some problems for Big Tech - System Design Products
-
Social Media (high read, low write)
- Users should be able to create posts featuring photos, videos, and a simple caption.
- Users should be able to follow other users.
-
Users should be able to see a chronological feed of posts from the users they follow.

-
Live comment (use Redis pub/sub for live comment, Kafka pub/sub for tracking)
- Viewers can post comments on a Live video feed (dễ)
- Viewers can see new comments being posted while they are watching the live video. (khó)
- Viewers can see comments made before they joined the live feed. (API cursor)

-
Likes posts (write behind solutions, shard init post1Likes_1, post1Likes_2, post1Likes_3)
- Users can like and unlike a post by toggling the like button.
- Do not need to query like_id in post_id due to O(logN)
- Solution 1: pre-computed like_count field in database
- Solution 2: Use redis counter
- Both the post owner and viewers should be able to see the total like count for post.

- Users can like and unlike a post by toggling the like button.
-
Search posts (Ingestion service)
- Users should be able to create and like posts.
- Users should be able to search posts by keyword.
- Inverted index: post + like
- Users should be able to get search results sorted by recency or like count. (Redis sorted set → Keep order)
- Client sends text query
- API Gateway forwards to Search Service
- Search Service pulls from Redis indexes:
- Keyword → [PostIds]
- Likes Index → score
- Creation Index → timestamp
- Combine (e.g., weighted ranking)
- Return sorted results to user
- Optimization
- Search result keep in the CDN first
- Ingestion and like service in background jobs.
- Cold and warm storage for index.

-
Youtube (high read, long write)
- Users can upload videos.
- Upload video, trancoding service to 1080 HD, 720 HD,… ⇒ Adaptive Birate Streaming Protocol
- Transcoding each success chunks after upload.
-
Users can watch (stream) videos.
- The client will fetch the VideoMetadata, which will have a URL pointing to the manifest file in S3.
- The client will download the manifest file.
- The client will choose a format based on network conditions / user settings. The client retrieves the URL for this segment in its chosen format from the manifest file.
- The client will download the first segment ⇒ and each time they search in video ⇒ find the current chunk

-
Top-k video
- Clients should be able to query the top K videos for all-time (up to a max of 1k results).
- Clients should be able to query tumbling windows of 1 {hour, day, month} and all-time (up to a max of 1k results) ⇒ Prefix sum.
- Idea: Batch processing in view consumer
- Top-K Cron → Query DB → Compute Top-K → Write to Redis
- Finds the Top-K most viewed videos by:
- last 1 hour
- last 24 hours
- overall

Feature Likes System YouTube Top-K Views Update frequency Real-time (per like) Batch (per 5–15 min) - Likes and search video
- Users can upload videos.
-
Chat App (high read, high write) ⇒ WebSocket
- Users should be able to start group chats with multiple participants (limit 100).
- Users should be able to send/receive messages.
- Users should be able to receive messages sent while they are not online (up to 30 days).
- Users should be able to send/receive media in their messages.
-
User can receive notifications when offline.





- If high throughput and decouping service ⇒ Using queue, otherwise do not use it.
- The Notification service integrates with external push notification providers like Firebase Cloud Messaging (FCM) and Apple Push Notification Service (APNS) to deliver messages as push notifications to offline users.
- If User B is online: Server A forwards the message to Server B, which delivers User B via their open WebSocket connection.
- If User B is offline: Server A sends the message to the notification service, which triggers a push notification to notify User B of the new message.
-
Live stream/Zoom call (high read, high write) ⇒ WebSocket
-
User can call 1 - 1, P2P

-
User can group call, Server-client
-
Using SFU: Like a pub/sub to 1 producer → N streams

-
-
-
Ride-hailing (low read, high write)
-
Riders
- Riders should be able to input a start location and a destination and get a fare estimate.
- Riders should be able to request a ride based on the estimated fare.
- Upon request, riders should be matched with a driver who is nearby and available.
- Users can search for nearby places (restaurants, gyms, salons, etc.) using their current location

- Drivers
- Drivers should be able to accept/decline a request and navigate to pickup/drop-off.
- Driver tracking: Once a rider is matched with a driver, the rider should be able to track the driver’s location and view the estimated time of arrival (ETA).
- Ratings and Payments
- Ratings: Both riders and drivers should have the ability to rate each other after a ride is completed.
- Payments: The user should be able to complete the payment after the ride is completed.
-
-
Booking System (high read, low write) (Yelp is search of booking)
- Searching
- The system should prioritize availability for searching & viewing events.
- The system should be scalable and able to handle high throughput in the form of popular events (10 million users, one event)
- The system is read heavy, and thus needs to be able to support high read throughput (100:1)
- The system should have low latency search (< 500ms)
- Booking
- The system should prioritize consistency for booking events (no double booking)
-
Local query
- Customers should be able to query availability of items, deliverable in 1 hour, by location (i.e. the effective availability is the union of all inventory nearby DCs).
- Customers should be able to order multiple items at the same time.

- Idea: Sharding by region-id

- Searching
Add these 5
-
Search engine (high read, high write)
- Handle billions of queries per day: Users worldwide constantly submit searches, and the system has to process them all.
- Return relevant results in under a second: Users expect near-instant feedback.
- Provide features like autocomplete and spell correction: The experience should guide users even when queries aren’t perfect.
-
Continuously update the index: As new web pages are created, they need to appear in results quickly.

-
Rate limiter / Key-Value / Web Crawler
2.1. Rate limiting (high read)
- The system should identify clients by user ID, IP address, or API key to apply appropriate limits.
- The system should limit HTTP requests based on configurable rules (e.g., 100 API requests per minute per user).
-
When limits are exceeded, the system should reject requests with HTTP 429 and include helpful headers (rate limit remaining, reset time).

2.2. Key-Value (high read)
- Users should be able to set, get, and delete key-value pairs.
- Users should be able to configure the expiration time for key-value pairs.
- Data should be evicted according to Least Recently Used (LRU) policy.

2.3. Web Crawler (high read, high write)
- Crawl the web starting from a given set of seed URLs.
- Extract text data from each web page and store the text for later processing.

-
Notification service + Job service (email/SMS/push) (high read, low write)
- Users should be able to schedule jobs to be executed immediately, at a future date, or on a recurring schedule (ie. “every day at 10:00 AM”).
- Users should be able monitor the status of their jobs.

- Message sent now: add to queue
- Message schedule: use Schedule service at the time fire to the queue.

-
Payment System (low read, low write)
- Merchants should be able to initiate payment requests (charge a customer for a specific amount).
- Users should be able to pay for products with credit/debit cards.
- Merchants should be able to view status updates for payments (e.g., pending, success, failed).

- Case: do not store PII, card_user_info in the system ⇒ Delegate it for Visa

-
Trading System (high read, low write)
- Users can see live prices of stocks.
- Users can manage orders for stocks (market / limit orders, create / cancel orders).

-
Leaderboard/Auction System (1 flow High-read, 1 flow High-write)
- Users should be able to post an item for auction with a starting price and end date.
- Users should be able to bid on an item. Where bids are accepted if they are higher than the current highest bid.
- Users should be able to view an auction, including the current highest bid.
- Top-N Queries: Display top N players (e.g., top 10, top 100) on the leaderboard update it in real-time.
- Player ’s Own Rank: Allow a player to query their current rank without scanning the entire leaderboard.


