Bird
Raised Fist0
HLDsystem_design~12 mins

Transcoding and adaptive bitrate in HLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Transcoding and adaptive bitrate

This system converts uploaded videos into multiple quality versions to support adaptive bitrate streaming. It ensures smooth playback by adjusting video quality based on the viewer's internet speed and device capability.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  v
API Gateway
  |
  v
Upload Service ---> Transcoding Service ---> Storage Service
                                   |
                                   v
                              CDN Service
                                   |
                                   v
                                 User
Components
User
client
Requests video upload and playback
Load Balancer
load_balancer
Distributes incoming requests evenly to backend services
API Gateway
api_gateway
Routes requests to appropriate services and handles authentication
Upload Service
service
Receives and stores original video uploads
Transcoding Service
service
Converts original videos into multiple quality versions for adaptive streaming
Storage Service
storage
Stores original and transcoded video files
CDN Service
cdn
Delivers video streams efficiently to users worldwide
Request Flow - 9 Hops
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayUpload Service
Upload ServiceTranscoding Service
Transcoding ServiceStorage Service
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayCDN Service
CDN ServiceUser
Failure Scenario
Component Fails:Transcoding Service
Impact:New videos cannot be converted into multiple quality versions, so adaptive streaming is unavailable for new uploads.
Mitigation:Retry transcoding jobs, scale service horizontally, or fallback to serving original video without adaptive bitrate.
Architecture Quiz - 3 Questions
Test your understanding
Which component is responsible for converting videos into multiple quality versions?
AUpload Service
BTranscoding Service
CCDN Service
DAPI Gateway
Design Principle
This architecture uses a dedicated transcoding service to prepare multiple video qualities, enabling adaptive bitrate streaming. The CDN caches and delivers video streams close to users, reducing latency and improving playback experience. Load balancing and API gateway ensure scalable and secure request handling.