Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 1.48 KB

README.md

File metadata and controls

28 lines (18 loc) · 1.48 KB

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