feat: Sharded pub/sub support via dedicated subscribers#1956
Merged
dmaier-redislabs merged 23 commits intomainfrom Mar 5, 2025
Merged
feat: Sharded pub/sub support via dedicated subscribers#1956dmaier-redislabs merged 23 commits intomainfrom
dmaier-redislabs merged 23 commits intomainfrom
Conversation
bobymicroby
reviewed
Feb 20, 2025
bobymicroby
reviewed
Feb 20, 2025
Member
|
There are some tests that need attention as well: |
… cluster before doing a refresh
* Resubscribe shard channels * Polishing
* Rewrote the resubscribe logic for sharded PubSub by making the sharded subscriber group aware of the channels. * Added and extended the integration test cases in regards to sharded pubsub. * Skipping the Coveralls build step if the action run is not coming via a PR.
Added an example for sharded Pub/Sub
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 5, 2025
# [5.6.0](v5.5.0...v5.6.0) (2025-03-05) ### Features * Sharded pub/sub support via dedicated subscribers ([#1956](#1956)) ([963a395](963a395))
|
🎉 This PR is included in version 5.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
seta-chuang-0909
added a commit
to seta-chuang-0909/socket.io-redis-adapter
that referenced
this pull request
Jan 12, 2026
- 在 util.ts 中添加 isIoRedisCluster 和 hasShardedSubscribers 輔助函數 - 在 sharded-adapter.ts 中添加 ioredis Cluster 配置驗證 - 啟用 [sharded] ioredis cluster 測試(需要 shardedSubscribers: true) - 更新 package.json 中 ioredis 版本要求到 ^5.9.0 - 更新 README.md 添加 ioredis Cluster 與 sharded pub/sub 的使用說明 - 添加 ioredis Cluster 的 natMap 配置以解決 Docker 環境問題 參考: redis/ioredis#1956
darrachequesne
pushed a commit
to socketio/socket.io-redis-adapter
that referenced
this pull request
Jan 20, 2026
Support for sharded pub/sub was added in `ioredis@5.9.0`. Related: - redis/ioredis#1759 - redis/ioredis#1956
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous implementation used one subscriber connection per cluster instance, but the command
SSUBSCRIBE <channel>needs to be executed against a node that is responsible for the hash slot that is derived from the channel name.This PR adds a ClusterSubscriberGroup whereby each subscriber in the group is responsible for one shard.