Which component is essential to ensure message delivery confirmation in a one-to-one messaging system?
Think about how to guarantee messages are not lost and are delivered even if the receiver is offline.
A message queue ensures messages are stored and forwarded reliably, confirming delivery even if the receiver is temporarily unavailable.
What is the best approach to handle millions of simultaneous user connections in a one-to-one messaging system?
Consider how to distribute load and maintain user session consistency.
Horizontal scaling with multiple servers and sticky sessions allows distributing user connections while keeping session data consistent.
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?
Think about user experience during network issues and how message delivery should behave.
Favoring availability allows users to send and receive messages even if some data replicas are temporarily inconsistent, improving user experience.
Which design choice ensures strict message ordering in a one-to-one messaging system?
Consider how to keep track of the order in which messages are sent and received.
Assigning a unique, incrementing sequence number per conversation allows the system to deliver messages in the exact order they were sent.
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.
Calculate total messages and multiply by average message size.
10 million users * 50 messages = 500 million messages daily. 500 million * 1 KB = 500 million KB = ~476.8 GB, which is approximately 500 GB.
