In a messaging system, why is it important to have low latency?
Think about how people use chat apps and expect replies.
Low latency ensures messages appear quickly, making conversations feel natural and real-time.
In a real-time messaging architecture, which component is primarily responsible for delivering messages instantly?
Consider how the server keeps a live connection open to send messages immediately.
WebSocket servers keep connections open, allowing instant two-way communication needed for real-time messaging.
Which approach best supports scaling a real-time messaging system to millions of users?
Think about distributing load and synchronizing messages across servers.
Multiple WebSocket servers handle many connections, while a message broker ensures messages reach all servers and clients.
In real-time messaging, what is the tradeoff when prioritizing availability over consistency?
Consider what happens if the system stays up but sacrifices strict order.
Prioritizing availability means the system stays responsive but may deliver messages out of order temporarily.
If a messaging app has 10 million users and 20% are active simultaneously, each maintaining a WebSocket connection, how many concurrent connections must the system support?
Calculate 20% of 10 million.
20% of 10 million is 2 million, so the system must handle 2 million concurrent WebSocket connections.
