Bird
Raised Fist0
HLDsystem_design~20 mins

Online presence system in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Online Presence System Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Design components for an online presence system
Which of the following components is essential to track real-time user online status in a scalable online presence system?
AA distributed in-memory cache with TTL (time-to-live) for each user's online status
BA centralized database that stores user status updated every minute by clients
CA batch job that processes user activity logs every hour to update status
DA static file server hosting user status snapshots updated daily
Attempts:
2 left
💡 Hint
Think about how to keep user status fresh and quickly accessible.
scaling
intermediate
2:00remaining
Handling high user concurrency in presence updates
If an online presence system must handle 10 million concurrent users updating their status every 30 seconds, which approach best reduces write load on the backend?
AClients update status only once per hour to reduce writes
BClients send updates to edge servers that aggregate and batch updates before forwarding
CEach client sends status updates directly to the main database
DClients write status updates to local files and upload daily
Attempts:
2 left
💡 Hint
Consider how to reduce the number of direct writes to the main backend.
tradeoff
advanced
2:00remaining
Choosing between push and pull models for presence updates
What is the main tradeoff when choosing a push-based model over a pull-based model for delivering online presence updates to users?
APull model requires clients to maintain persistent connections, increasing server load
BPush model reduces server load but increases client latency
CPush model increases server resource usage but provides lower latency updates
DPull model guarantees real-time updates without extra server cost
Attempts:
2 left
💡 Hint
Think about resource usage and update speed differences.
🧠 Conceptual
advanced
2:00remaining
Ensuring consistency in distributed presence data
In a distributed online presence system, which consistency model best balances availability and freshness of user status?
AEventual consistency with asynchronous updates and conflict resolution
BStrict serializability with global locking on user status
CNo consistency guarantees, allowing stale data freely
DStrong consistency with synchronous replication across all nodes
Attempts:
2 left
💡 Hint
Consider tradeoffs between availability and data freshness in distributed systems.
estimation
expert
3:00remaining
Estimating storage needs for presence data
Estimate the daily storage required to keep online presence status for 50 million users, assuming each status update record is 100 bytes and each user updates status every 15 seconds.
AApproximately 720 TB per day
BApproximately 1.44 PB per day
CApproximately 288 TB per day
DApproximately 576 TB per day
Attempts:
2 left
💡 Hint
Calculate updates per user per day, multiply by users and record size.