Bird
Raised Fist0
HLDsystem_design~20 mins

Group messaging in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Group Messaging Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Identify the correct architecture for a scalable group messaging system

You want to design a group messaging system that supports millions of users sending messages in real-time. Which architecture best supports scalability and low latency?

AA microservices architecture with separate services for user management, message routing, and storage, using message queues for communication.
BA single database storing all messages with clients polling the database every second for new messages.
CA peer-to-peer network where each client directly sends messages to all group members without servers.
DA monolithic server handling all message routing and storage for all groups.
Attempts:
2 left
💡 Hint

Think about how to separate concerns and handle high load efficiently.

scaling
intermediate
2:00remaining
Estimate the number of servers needed for message delivery

Your group messaging system expects 10 million active users sending an average of 20 messages per day. Assume average group size of 130 members. Each server can handle 1000 messages per second. How many servers are needed to handle peak load assuming peak traffic is 10% of daily messages concentrated in 1 hour?

A1200 servers
B720 servers
C600 servers
D360 servers
Attempts:
2 left
💡 Hint

Calculate total messages per hour during peak, apply fanout for deliveries, then divide by server capacity.

tradeoff
advanced
2:00remaining
Choose the best data storage approach for group messages

Which data storage approach balances fast message retrieval and efficient storage for a group messaging system with millions of groups?

AKeep all messages in memory on a single server for fastest access.
BStore all messages in a single relational database table indexed by group ID and timestamp.
CStore messages as files on a shared network file system organized by group folders.
DUse a distributed NoSQL database partitioned by group ID with message data stored in append-only logs.
Attempts:
2 left
💡 Hint

Consider scalability and write/read patterns for group messaging.

🧠 Conceptual
advanced
2:00remaining
Understand message delivery guarantees in group messaging

Which message delivery guarantee ensures that every message sent to a group is received exactly once by all group members, even if some servers fail?

AExactly once delivery
BBest effort delivery
CAt least once delivery
DAt most once delivery
Attempts:
2 left
💡 Hint

Think about avoiding duplicates and message loss.

component
expert
2:00remaining
Trace the request flow for sending a message in a large group

In a group messaging system, what is the correct sequence of components involved when a user sends a message to a large group?

A1,3,2,4
B2,1,3,4
C1,2,3,4
D1,2,4,3
Attempts:
2 left
💡 Hint

Follow the logical flow from client to delivery.