Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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

image

### 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.