Skip to content

Commit 9431da0

Browse files
docs(websockets): update adapter.md
1 parent 875b9c0 commit 9431da0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/websockets/adapter.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The WebSockets module is platform-agnostic, hence, you can bring your own librar
2929

3030
The [socket.io](https://github.com/socketio/socket.io) package is wrapped in an `IoAdapter` class. What if you would like to enhance the basic functionality of the adapter? For instance, your technical requirements require a capability to broadcast events across multiple load-balanced instances of your web service. For this, you can extend `IoAdapter` and override a single method which responsibility is to instantiate new socket.io servers. But first of all, let's install the required package.
3131

32+
> warning **Warning** To use socket.io with multiple load-balanced instances you either have to disable polling by setting `transports: ['websocket']` in your clients socket.io configuration or you have to enable cookie based routing in your load balancer. Redis alone is not enough. See [here](https://socket.io/docs/v4/using-multiple-nodes/#enabling-sticky-session) for more information.
33+
3234
```bash
3335
$ npm i --save redis socket.io @socket.io/redis-adapter
3436
```

0 commit comments

Comments
 (0)