Bird
Raised Fist0
HLDsystem_design~20 mins

Media storage and CDN in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Media Storage & CDN Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Design a scalable media storage system for millions of users

You need to design a media storage system that can handle millions of users uploading images and videos daily. Which architectural component is most critical to ensure scalability and fast access?

AStore media files in distributed object storage and metadata in a separate database.
BStore media files directly in the application server's local disk for faster access.
CUse a peer-to-peer network where users share media files directly without central storage.
DUse a single large database server to store all media files and metadata.
Attempts:
2 left
💡 Hint

Think about separating file storage from metadata and how to handle large scale.

scaling
intermediate
2:00remaining
Handling sudden traffic spikes in CDN delivery

Your CDN is delivering media content globally. Suddenly, a viral video causes a huge spike in traffic. What is the best way to handle this spike without degrading user experience?

ADisable caching so all requests go to the origin server for fresh content.
BIncrease the origin server capacity to handle all requests directly.
CRely on CDN edge caching to serve most requests and scale edge nodes automatically.
DLimit user access by blocking some regions temporarily to reduce load.
Attempts:
2 left
💡 Hint

Consider how CDNs reduce load on origin servers during high traffic.

tradeoff
advanced
2:00remaining
Choosing between CDN push and pull models

When designing a CDN for media delivery, you must choose between push and pull models. Which tradeoff is true?

APull CDN preloads all content to edges, which reduces storage cost but increases latency.
BPush CDN requires preloading content to edge servers, increasing storage cost but reducing first-request latency.
CPush CDN always delivers content slower than pull CDN because of extra replication steps.
DPull CDN requires manual upload of content to each edge server before delivery.
Attempts:
2 left
💡 Hint

Think about when content is sent to edge servers in each model.

component
advanced
2:00remaining
Key components of a media CDN architecture

Which component is essential in a CDN architecture to ensure media content is delivered efficiently and securely?

AEdge servers that cache media content close to users and handle most delivery requests.
BOrigin server that stores the original media files and handles all user requests.
CLoad balancer that distributes user requests only among origin servers.
DDatabase cluster that stores user credentials and media metadata but does not cache content.
Attempts:
2 left
💡 Hint

Consider which component reduces latency and bandwidth usage.

estimation
expert
3:00remaining
Estimating storage and bandwidth for a global media CDN

Your service expects 10 million daily active users uploading 5 MB average media files each, and 100 million daily views with average 3 MB per view. Estimate the daily storage and bandwidth requirements for the CDN.

AStorage: 50 TB per day; Bandwidth: 30 TB per day
BStorage: 500 TB per day; Bandwidth: 30 TB per day
CStorage: 5 TB per day; Bandwidth: 3000 TB per day
DStorage: 50 TB per day; Bandwidth: 300 TB per day
Attempts:
2 left
💡 Hint

Calculate storage from uploads and bandwidth from views multiplied by average sizes.