Bird
Raised Fist0
HLDsystem_design~20 mins

News feed generation in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
News Feed Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Design components for a scalable news feed system

Which of the following component sets best supports a scalable news feed generation system that handles millions of users with low latency?

AUser service, Feed generator, Cache layer, Database, Message queue
BUser service, Monolithic feed generator, Single database, No cache
CUser service, Feed generator, Cache layer, Multiple databases without queue
DUser service, Feed generator, Cache layer, Message queue, No database
Attempts:
2 left
💡 Hint

Think about components that help with asynchronous processing and fast data retrieval.

scaling
intermediate
2:00remaining
Handling high write throughput in news feed updates

When millions of users post updates simultaneously, which approach best handles the write load for news feed generation?

ABatch updates once a day to reduce write frequency
BDirectly write all updates synchronously to the main database
CStore updates only in cache without persistence
DUse a distributed message queue to buffer updates and process them asynchronously
Attempts:
2 left
💡 Hint

Consider how to smooth out spikes in write traffic.

tradeoff
advanced
2:00remaining
Tradeoffs between push and pull models in news feed generation

Which statement correctly describes a tradeoff between push and pull models for generating user news feeds?

APull model reduces latency but increases storage cost; push model reduces storage but increases latency
BPush model reduces latency but increases storage cost; pull model reduces storage but increases latency
CPush model increases latency and storage cost; pull model reduces both latency and storage
DPush and pull models have identical latency and storage costs
Attempts:
2 left
💡 Hint

Think about when feed data is prepared and stored.

🧠 Conceptual
advanced
2:00remaining
Impact of fan-out on news feed system design

What is the main challenge caused by high fan-out (users with millions of followers) in news feed generation?

AIt causes excessive read load on the database
BIt reduces the number of messages in the queue
CIt causes excessive write amplification and storage overhead
DIt simplifies feed generation logic
Attempts:
2 left
💡 Hint

Consider what happens when one user’s post must be delivered to many followers.

estimation
expert
3:00remaining
Estimating storage for a news feed system

Estimate the daily storage needed if 10 million users each post 2 updates per day, and each update is stored in the feeds of 500 followers. Each feed entry is 1 KB.

AApproximately 10 TB per day
BApproximately 5 TB per day
CApproximately 1 TB per day
DApproximately 20 TB per day
Attempts:
2 left
💡 Hint

Calculate total updates, multiply by followers, then by size.