Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duyledat197/messenger
Design a messenger platform that can serve for around more than 100M users. The platform supports web and mobile apps(android, ios).
https://github.com/duyledat197/messenger
cassandra clean-code golang grpc grpc-ecosystem grpc-gateway mqtt opensearch postgresql protoc redis scylladb swagger webrtc websocket
Last synced: 28 days ago
JSON representation
Design a messenger platform that can serve for around more than 100M users. The platform supports web and mobile apps(android, ios).
- Host: GitHub
- URL: https://github.com/duyledat197/messenger
- Owner: duyledat197
- License: other
- Archived: true
- Created: 2024-03-22T11:28:24.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-28T10:12:23.000Z (8 months ago)
- Last Synced: 2024-09-30T04:02:31.397Z (5 months ago)
- Topics: cassandra, clean-code, golang, grpc, grpc-ecosystem, grpc-gateway, mqtt, opensearch, postgresql, protoc, redis, scylladb, swagger, webrtc, websocket
- Language: Go
- Homepage:
- Size: 313 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Problem Statement
Design a messenger platform that can serve for around more than 100M users. The platform supports web and mobile apps(android, ios).
# Gathering Requirements
- Chatting:
+ Support one-on-one conversation.
+ Support group chat that has more than 1000 users per group.
+ Support those who already read the last message.
+ Support message sent time and message read time per user.
- Sending file, and attachment in a conversation:
+ Maximum size of a file, attachment is 5MB.
+ Maximum per sending is 5 files.
+ Just support image types(jpg, jpeg, png, SVG, ...) or document types(doc, docx, csv, xlsx).
+ Support emoji reaction for each message.
- Story video:
+ User can post brief videos.
+ User can post 10 brief videos per day.
+ Video duration must not exceed 60 seconds.
+ Support emoji reaction for each video.
# Capacity Planning
- Number of users on the application every month: 1M
- Number of active users per second at peak traffic: 500K
- Number of messages per second at peak traffic: 10M
- Estimate Database store size: 1M users * 5KB per user
# High-level Design
## General Design
## Chatting Design
## Emoji Design
# Protocols
# Database
- Pros/Cons Between databases
- Decided or Plan# API Design
# Monitoring
1. Availability SLA: p99.999
2. Latency SLA: p99.99 of 5 milliseconds