Example of system design of social network.
System Design course link.
- https://vc.ru/vk/279614-auditoriya-vkontakte-2021-ezhegodnyy-rost-prodolzhaetsya
- https://c4model.com/
- https://github.com/plantuml-stdlib/C4-PlantUML
- https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
- Add and delete friends
- View users' friends
- View user's profile
- Publish posts
- View feed of posts (home and user feed)
- Upload media files for posts
- Send and read messages in one-on-one and group chats
- View one-on-one and group chats
- 50 000 000 DAU
- Availability 99.99% (52.56 minutes downtime per year)
- The system should be scalable and efficient
- Each user sends an average of 1 post per 3 day
- Each user reads feeds an average of 10 times per day
- The size of each post is a maximum of 3000 characters
- The size of each media files is a maximum 1MB
- 10% of posts contain media files
- Each post has a maximum 3 media files
- A message should reach the recipient in 3 seconds
- Each user sends an average of 10 messages per day
- Each user reads messages an average of 20 times per day
- The size of each message is a maximum of 1000 characters
- A user can have a maximum of 1000 friends
- A group can have a maximum of 100 participants
- Posts and messages are stored forever
- Geo distribution is not supported
- No seasonality
Text traffic:
Media files traffic:
Total:
Database size for storing messages for 5 years:
Database size for storing posts for 5 years:
Total:
Number of disks (disk capacity = 16 TB):
Level 1. System context diagram
Level 2. Profile system container diagram
Level 2. Relation system container diagram
Level 2. Post system container diagram
Level 2. Media system container diagram
Level 2. Message system container diagram