Scalable chat application in a microservices architecture

minghsu0107

Hao-Ming Hsu

Posted on February 2, 2023

Scalable chat application in a microservices architecture

I'd like to share my side project: https://github.com/minghsu0107/go-random-chat

This is a random chat application built in a microservices architecture. An user can pair with a random person and chat in real-time.

Image description

This project is built with scalability in mind. I used websocket for real-time messaging, Kafka for message Pub/Sub (to make chat service stateless), Redis for caching and user matching, Cassandra for message persistence, JWT & session for authentication, and gRPC for inter-service communication. Other common features like Google OAuth2 login, file uploads (object storage), observability (Prometheus & Opentelemetry), dependency injection (wire), CLI (cobra), and config management (viper) are also implemented.

I hope you will find this helpful. Any PR is welcome!

💖 💪 🙅 🚩
minghsu0107
Hao-Ming Hsu

Posted on February 2, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related