WhatsApp Design Evaluation

Evaluate the detailed WhatsApp design and the associated non-functional requirements.

Fulfilling requirements

Our non-functional requirements for the proposed WhatsApp design are low latency, consistency, availability, and security. Let’s discuss one by one how we have achieved them.

  1. Low latency: There are various levels at which we can minimize the latency of the system.

    • Through geographically distributed WebSocket servers and the cache associated with them.

    • By using Redis cache clusters on top of MySQL database clusters.

    • Using CDNs for frequently sharing documents and media content.

  2. Consistency: The system also provides high consistency in messages with the help of a FIFO messaging queue with strict ordering. However, the ordering of messages would require Sequencer to provide ID (with appropriate causality inference mechanisms) to each message. For offline users, the Mnesia database stores messages in a queue that are sent later in a sequence after the user goes online.

  3. Availability: The system can be made highly available by providing enough WebSocket Servers and replicating data across multiple servers. When a user gets disconnected due to some fault in the WebSocket server, the session is re-created via a load balancer with a different server. Moreover, the messages are stored on the Mnesia cluster following the primary-secondary replication model, which provides high availability and durability.

  4. Security: The system also provides an end-to-end encryption mechanism that secures the chat between users.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy