https://github.com/thakursaurabh1998/distributed-websocket-server
This is a POC/template for creating a distributed service for handling websocket connections using Redis as the central pub/sub provider.
https://github.com/thakursaurabh1998/distributed-websocket-server
distributed golang redis websocket
Last synced: about 2 months ago
JSON representation
This is a POC/template for creating a distributed service for handling websocket connections using Redis as the central pub/sub provider.
- Host: GitHub
- URL: https://github.com/thakursaurabh1998/distributed-websocket-server
- Owner: thakursaurabh1998
- Created: 2023-10-28T03:50:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-01T07:48:37.000Z (over 2 years ago)
- Last Synced: 2025-01-30T01:41:44.789Z (over 1 year ago)
- Topics: distributed, golang, redis, websocket
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Distributed Websocket Server
This is a POC/template for creating a distributed service for handling websocket connections using Redis as the central pub/sub provider.
### The aim of the POC:
- To be able to create multiple servers connecting to a single Redis instance where all the messages from websockets are published to and subscribed from.
- If the `--redis` flag isn't provided, then the websocket server shouldn't rely on a Redis server and maintain all the messages in memory until they're written to the sockets
### Why Redis?
We're using Redis here for it's use case as a multiplexer to which all the backend servers connect to and the system is horizontally scalable without creating a stickiness to a single server for websocket connections.
We can also use any other pub/sub provider in place of Redis.