Design a Video Sharing Platform
Company: Tesla
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
# Design a Video Sharing Platform
Design a large-scale service where users upload videos and viewers play them reliably across different devices and network conditions. Cover the upload and processing pipeline, metadata, playback delivery, and the operational controls needed for popular content.
### Constraints & Assumptions
- Source video is much larger than ordinary API payloads.
- Processing is asynchronous and may fail or be retried.
- Playback should adapt to bandwidth without exposing unfinished or unauthorized assets.
### Clarifying Questions to Ask
- Which upload size, format, latency, and availability targets matter?
- Are videos public, private, or access-controlled?
- Is live streaming in scope, or only uploaded video on demand?
```hint Separate control and media paths
Metadata APIs and authorization have different traffic and storage needs from upload bytes and playback segments.
```
### What a Strong Answer Covers
- Resumable direct upload and durable metadata state.
- Idempotent transcoding, packaging, thumbnails, and publication.
- Object storage, CDN delivery, adaptive bitrate manifests, and authorization.
- Hot-content scaling, observability, moderation hooks, and lifecycle policy.
### Follow-up Questions
- How would you invalidate an unsafe video already cached at the edge?
- How would the design change for live streaming?
Overview: Design a large-scale video platform with resumable uploads, idempotent transcoding, adaptive playback, CDN delivery, access control, and moderation hooks.