Dec. 14, 2019
Introduction
It is my idea to study system design. I should learn the basics first, and then I should be able to come out good ideas to give a tech talk on system design interview.
Case study
I like to read the grokking system design lecture notes, and also take some notes as well.
Capacity estimation and constraints
500 million daily active users
average each user sends 40 message daily
total 20 billion message per day.
storage estimation:
average a message is 100 bytes, to store all the messages for one day, 2TB of storage
20 billion messages * 100 bytes => 2 TB/ day
To save five years of chat history, 3.6 petabytes of storage
2TB * 365 days * 5 years = 3.6 PB
Besides chat message, users' information, messages' metadata (ID, Timestamp, etc. )
Bandwidth estimation:
2 TB every day, 25 MB of incoming data for each second
2 TB/ 86400 sec ~= 25 MB/ s
same amount of bandwidth 25 MB/s for both upload and download.
No comments:
Post a Comment