Bird
Raised Fist0
HLDsystem_design~20 mins

One-to-one messaging in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
One-to-One Messaging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Design Components for One-to-One Messaging

Which component is essential to ensure message delivery confirmation in a one-to-one messaging system?

ALoad Balancer to distribute incoming messages evenly
BCache Layer to store user profiles temporarily
CMessage Queue to store and forward messages reliably
DAnalytics Module to track message read rates
Attempts:
2 left
💡 Hint

Think about how to guarantee messages are not lost and are delivered even if the receiver is offline.

scaling
intermediate
2:00remaining
Scaling User Connections in One-to-One Messaging

What is the best approach to handle millions of simultaneous user connections in a one-to-one messaging system?

AImplement horizontal scaling with multiple servers and sticky sessions
BUse client polling every second to check for new messages
CStore all messages in a single database instance
DUse a single centralized server with multi-threading
Attempts:
2 left
💡 Hint

Consider how to distribute load and maintain user session consistency.

tradeoff
advanced
2:00remaining
Tradeoff Between Consistency and Availability

In a one-to-one messaging system, choosing between strong consistency and high availability during network partitions is a challenge. Which option best describes this tradeoff?

AFavor consistency by blocking message delivery until all replicas confirm receipt
BFavor availability by allowing messages to be delivered even if some replicas are out of sync
CIgnore network partitions and continue normal operations
DUse a single database to avoid replication issues
Attempts:
2 left
💡 Hint

Think about user experience during network issues and how message delivery should behave.

🧠 Conceptual
advanced
2:00remaining
Message Ordering Guarantees

Which design choice ensures strict message ordering in a one-to-one messaging system?

ADeliver messages as soon as they arrive without buffering
BStore messages in multiple shards without coordination
CUse eventual consistency for message storage
DAssign a unique, incrementing sequence number to each message per conversation
Attempts:
2 left
💡 Hint

Consider how to keep track of the order in which messages are sent and received.

estimation
expert
3:00remaining
Capacity Estimation for One-to-One Messaging

Estimate the storage needed per day for a one-to-one messaging system with 10 million active users, each sending 50 messages daily. Assume average message size is 1 KB.

AApproximately 500 GB per day
BApproximately 5 TB per day
CApproximately 50 TB per day
DApproximately 500 TB per day
Attempts:
2 left
💡 Hint

Calculate total messages and multiply by average message size.