System Design: Two Independent Systems
You are asked to design two large-scale systems. For each system, provide:
-
Scope and key requirements
-
External APIs (read/write) and internal service interfaces
-
Storage choices and data modeling
-
Scalability strategy and high-level architecture
-
Consistency model and data flow
-
Reliability, availability, and observability plans
Where relevant, estimate traffic/storage, and discuss cost and security trade-offs.
1) Video Sharing Platform (YouTube-like)
Requirements:
-
Video upload, validation, and asynchronous transcoding into multiple bitrates and codecs
-
Storage tiering (hot/warm/cold), CDN delivery with adaptive streaming (HLS/DASH)
-
Metadata and search, user actions (watch, like, comment)
-
Recommendations interface (feature and event APIs to interact with a separate recs system)
-
Estimate traffic/storage; design ingestion pipeline, thumbnail generation, indexing
-
Caching (metadata, watch pages), rate limiting and abuse controls
-
Multi-region availability, encryption/DRM, and cost trade-offs
Deliver:
-
Architecture, APIs, queues, storage choices
-
Consistency choices for user actions and metadata vs search
-
Scalability strategy for upload, transcode, playback, and indexing
-
Reliability and observability plan
2) Marketplace Catalog System
Requirements:
-
Large catalog with categories, attributes, products, and product variants (SKUs)
-
Item ingestion (batch/stream), versioning, deduplication, and moderation workflows
-
Services for search/browse indexing with localization and incremental updates
-
Read/write APIs, caching, and consistency model between the source of truth (SQL/NoSQL) and the search index
-
Address schema evolution, multi-tenant isolation, and backfill/reprocessing strategies
Deliver:
-
Domain model and storage choices
-
Ingestion and moderation flows
-
Indexing pipeline and cache strategy
-
Consistency, availability, and observability plans