Scalability for Facebook Messenger
So in particular, one thing we are thinking about is the cost of going to our database and retrieving messages from it repeatedly so one thing we would like to add to the architecture is some sort of caching service or caching layer which would be like a read-through cache.
How we are going to store media?
Now, how we are going to store media like images and videos, and how we can upload those to the correct place. We are not going to store those in our database but instead, we’re going to choose some sort of other storage platform like an object storage service like Amazon S3. Now, in order to make that more efficient we will also want to add caching. In this case, we would use something like a CDN.
The last thing we want to add in the architecture is some sort of way to notify users who are offline, about messages they may have missed. So in this case, we might want to have a notification service that is also going to be contacted by our message service in the event that the user is offline.
Designing Facebook Messenger | System Design Interview
We are going to build a real-time Facebook messaging app, that can support millions of users. All the chat applications like Facebook Messenger, WhatsApp, Discord, etc. can be built using the same design. In this article, we will discuss the high-level architecture of the system as well as some specific features like building real-time messaging, group messaging, image and video uploads as well and push notifications.
Important Topics for Facebook Messenger System Design
- Requirements
- Design of Facebook Messenger
- Communication Protocol for Facebook Messenger
- API Used for Facebook Messenger
- Database Design for Facebook Messenger
- Data Types
- Scalability for Facebook Messenger
- Conclusion
Contact Us