Skip to content

A robust and horizontal scalable real-time chat server using SpringBoot WebFlux and Websocket-Redis(Pub/Sub)

Notifications You must be signed in to change notification settings

aarhank/Scalable-Chat-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scalable Chat Server

Redis Spring Java

A robust and horizontal scalable real-time chat server using SpringBoot WebFlux and Websocket-Redis(Pub/Sub). This demonstrates a real-time chat server in a Microservice Architecture to handle high demands, while maintaining Sync between multiple instances.

Horizontal Scaling

Horizontal scaling refers to adding more machines to your infrastructure to cope with the high demand on the server. In our microservice context, scaling horizontally is the same as deploying more instances of the microservice, A load balancer will then be required to distribute the traffic among the multiple microservice instances

Issue : Message loss due to the load balancer / No Sync between instances

issue.png

Solution : Broadcast messages using Pub/Sub

solution.png This solution is inspired by Amr Saleh article - Building Scalable Facebook-like Notification using Server-Sent Events and Redis

Examples

example1.png

example2.png

About

A robust and horizontal scalable real-time chat server using SpringBoot WebFlux and Websocket-Redis(Pub/Sub)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages