{"id":15056669,"url":"https://github.com/duyledat197/messenger","last_synced_at":"2025-10-04T16:31:48.325Z","repository":{"id":243685107,"uuid":"775951823","full_name":"duyledat197/messenger","owner":"duyledat197","description":"Design a messenger platform that can serve for around more than 100M users. The platform supports web and mobile apps(android, ios).","archived":true,"fork":false,"pushed_at":"2024-06-28T10:12:23.000Z","size":320,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-30T04:02:31.397Z","etag":null,"topics":["cassandra","clean-code","golang","grpc","grpc-ecosystem","grpc-gateway","mqtt","opensearch","postgresql","protoc","redis","scylladb","swagger","webrtc","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duyledat197.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-22T11:28:24.000Z","updated_at":"2024-08-03T06:02:28.000Z","dependencies_parsed_at":"2024-06-10T17:07:50.914Z","dependency_job_id":"f7766285-2cc1-4d75-8ccf-5d07af8fc353","html_url":"https://github.com/duyledat197/messenger","commit_stats":null,"previous_names":["duyledat197/messenger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duyledat197%2Fmessenger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duyledat197%2Fmessenger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duyledat197%2Fmessenger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duyledat197%2Fmessenger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duyledat197","download_url":"https://codeload.github.com/duyledat197/messenger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235285421,"owners_count":18965324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cassandra","clean-code","golang","grpc","grpc-ecosystem","grpc-gateway","mqtt","opensearch","postgresql","protoc","redis","scylladb","swagger","webrtc","websocket"],"created_at":"2024-09-24T21:54:56.235Z","updated_at":"2025-10-04T16:31:42.990Z","avatar_url":"https://github.com/duyledat197.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Problem Statement\nDesign a messenger platform that can serve for around more than 100M users. The platform supports web and mobile apps(android, ios).\n# Gathering Requirements\n- Chatting:\n  + Support one-on-one conversation.\n  + Support group chat that has more than 1000 users per group.\n  + Support those who already read the last message.\n  + Support message sent time and message read time per user.\n- Sending file, and attachment in a conversation:\n  + Maximum size of a file, attachment is 5MB.\n  + Maximum per sending is 5 files.\n  + Just support image types(jpg, jpeg, png, SVG, ...) or document types(doc, docx, csv, xlsx).\n  + Support emoji reaction for each message.\n- Story video:\n  + User can post brief videos.\n  + User can post 10 brief videos per day.\n  + Video duration must not exceed 60 seconds.\n  + Support emoji reaction for each video.\n# Capacity Planning\n- Number of users on the application every month: 1M\n- Number of active users per second at peak traffic: 500K\n- Number of messages per second at peak traffic: 10M\n- Estimate Database store size: 1M users * 5KB per user\n# High-level Design\n## General Design\n![messenger_high_level_design general](https://github.com/duyledat197/messenger/assets/38448882/0fb884be-78e1-41f0-bfc6-1c4590dd8b8d)\n\n## Chatting Design\n![chatting_high_level_design drawio](https://github.com/duyledat197/messenger/assets/38448882/c592f2b1-18d3-4dc6-8e95-8af82e02eeec)\n\n## Emoji Design\n![messenger_high_level_design](https://github.com/duyledat197/messenger/assets/38448882/a6af24ec-0cf7-44e4-8caa-6b58d5468066)\n\n# Protocols\n\n# Database\n- Pros/Cons Between databases\n- Decided or Plan\n\n# API Design\n\n# Monitoring\n1. Availability SLA: p99.999\n2. Latency SLA: p99.99 of 5 milliseconds\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduyledat197%2Fmessenger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduyledat197%2Fmessenger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduyledat197%2Fmessenger/lists"}