Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add adapter based on sharded Pub/Sub
Reference: https://redis.io/docs/manual/pubsub/#sharded-pubsub Usage: ```js import { Server } from 'socket.io'; import { createClient } from 'redis'; import { createShardedAdapter } from '@socket.io/redis-adapter'; const pubClient = createClient({ host: 'localhost', port: 6379 }); const subClient = pubClient.duplicate(); await Promise.all([ pubClient.connect(), subClient.connect() ]); const io = new Server({ adapter: createShardedAdapter(pubClient, subClient) }); io.listen(3000); ``` Related: #491
- Loading branch information