Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omran95/chatroom
Backend for Real-time, Highly-Scalable Chat Room App
https://github.com/omran95/chatroom
cassandra docker golang grpc kafka opentelemetry prometheus rate-limiter redis traefik websocket
Last synced: 3 months ago
JSON representation
Backend for Real-time, Highly-Scalable Chat Room App
- Host: GitHub
- URL: https://github.com/omran95/chatroom
- Owner: omran95
- License: mit
- Created: 2024-06-07T22:41:46.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-05T11:59:22.000Z (6 months ago)
- Last Synced: 2024-09-27T06:43:10.596Z (3 months ago)
- Topics: cassandra, docker, golang, grpc, kafka, opentelemetry, prometheus, rate-limiter, redis, traefik, websocket
- Language: Go
- Homepage:
- Size: 640 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chatroom
![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/omran95/chatroom?label=Version&sort=semver)Backend for a real-time chat room app in a highly scalable architecture.
### System architecture
### Features
- Real-time chatting using websockets.
- Services **are stateless** and can be horizontally scaled.
- `room`: creates rooms (public/protected) and handles messages.
- `subscriber`: maintains Kafka subscriber topics for each room in a Redis cluster.- Traefik for efficient HTTP reverse proxying and load balancing
- gRPC for low-latency and high-throughput inter-service communication.
- with retry (Exponential backoff with jitter), timeout, and circuit breaker.
- Graceful shutdown.
- Observability using Prometheus + Grafana for service monitoring and OpenTelemetry + Jaeger for distributed tracing.
- Pub/Sub using Kafka with partitioning for parallel processing.
- Persist messages and rooms in Cassandra, A highly available and scalable NoSQL Database with tunable consistency.
- Protect the create room API with distributed rate limiting using the Token-Bucket Algorithm with Redis.
- Broadcasting seen, typing, joining, and leaving events to all room members.