...

/

Requirements of WhatsApp Design [backup]

Requirements of WhatsApp Design [backup]

Understand and identify the functional and non-functional requirements for a chat application like WhatsApp.

Design problem

In today’s technological world, WhatsApp is an important messaging application that connects billions of people around the globe. Among many other important things, many users’ day starts with reading or sending WhatsApp messages to their significant ones. However, there are some questions about WhatsApp that come to mind, for example:

  • How is this application designed?
  • How does it work?
  • What are the different types of components involved in it?
  • How does WhatsApp enable billions of users to communicate with each other?
  • How does WhatsApp keep all that data secure?

In this chapter, we will focus on the high-level and detailed design of the WhatsApp application to answer the above questions. To limit the scope of the problem we will look into the following functional and non-functional requirements.

Requirements

Our design of the WhatsApp messenger should meet the following requirements.

Functional requirements

  • Conversation: The system should support one-on-one and group conversations between users.

  • Acknowledgment: The system should support message delivery acknowledgment, i.e., sent, delivered, and read.

  • Sharing: The system should support sharing of media files, i.e., images, videos, audio.

  • Chat storage: The system should support the persistent storage of chat (messages) when a user is offline until the successful delivery of messages.

  • Push notifications: The system should be able to notify offline users of new messages once their status becomes online.

Non-functional requirements

  • Low latency: Users should be able to receive messages with low latency.

  • Consistency: Messages should be delivered in the order as sent by the sender. Moreover, users should also see the same chat history on all of their devices.

  • Availability: The system should be highly available; however, the availability can be compromised in the interest of consistency.

  • Security: The system should be able to provide high security via end-to-end encryption. The end-to-end encryption ensures that only the two communicating parties can see the content of messages, and nobody in between, not even WhatsApp.

Capacity estimation

WhatsApp is the most used messaging application across the globe. According to WhatsApp, it supports more than 2 Billion users around the world who share more than 100 Billion messages each day. We need to estimate the storage capacity, bandwidth, and number of servers to support such an enormous number of users and messages.

Storage

As there are more than 100 Billion messages shared per day over WhatsApp, let’s estimate the storage capacity based on this figure. Assume that each message takes 100 bytes on average. Moreover, the WhatsApp servers keep the messages only for 30 days. So, if the user doesn’t get connected to the server within these days the messages will be permanently deleted from the server.

100 Bill ...

Create a free account to access the full course.

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