System Design: News Feed and Temporary Email Service
Design the following two distinct systems:
1. Aggregate News Feed Service
Build a service that performs the following functions:
- Ingests articles from a multitude of publishers.
- Deduplicates and ranks ingested articles.
- Serves personalized news feeds to various client types, with a particular focus on mobile clients.
Discuss the following API design considerations:
- Choices between REST and RPC.
- Implementation of pagination.
- Strategies for caching.
- How the API surface should adapt to different client capabilities (e.g., mobile vs. web).
2. Temporary Email Service
Design a disposable email platform with the following capabilities and constraints:
- Creates email inboxes on demand.
- Receives inbound mail for generated addresses.
- Allows users to read messages associated with their generated addresses.
Two hard requirements for this service are:
- Generated usernames must appear plausibly human, not obviously random, to minimize rejection by external websites.
- Usernames must never be reused.
- The system must be capable of generating a very large number of new addresses daily.
Discuss the following specific challenges:
- How to generate human-looking addresses at scale.
- How to check for username uniqueness quickly.
- What tradeoffs arise if probabilistic structures, such as Bloom filters, are considered for uniqueness checks.
AI interview prep
Core dilemma
Balancing the need for high-throughput, low-latency data ingestion and serving (News Feed) with strict data integrity and uniqueness requirements for rapidly generated, non-reusable identifiers (Email Service), all while operating at massive scale.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
System Design: News Feed and Temporary Email Service
Design the following two distinct systems:
1. Aggregate News Feed Service
Build a service that performs the following functions:
- Ingests articles from a multitude of publishers.
- Deduplicates and ranks ingested articles.
- Serves personalized news feeds to various client types, with a particular focus on mobile clients.
Discuss the following API design considerations:
- Choices between REST and RPC.
- Implementation of pagination.
- Strategies for caching.
- How the API surface should adapt to different client capabilities (e.g., mobile vs. web).
2. Temporary Email Service
Design a disposable email platform with the following capabilities and constraints:
- Creates email inboxes on demand.
- Receives inbound mail for generated addresses.
- Allows users to read messages associated with their generated addresses.
Two hard requirements for this service are:
- Generated usernames must appear plausibly human, not obviously random, to minimize rejection by external websites.
- Usernames must never be reused.
- The system must be capable of generating a very large number of new addresses daily.
Discuss the following specific challenges:
- How to generate human-looking addresses at scale.
- How to check for username uniqueness quickly.
- What tradeoffs arise if probabilistic structures, such as Bloom filters, are considered for uniqueness checks.