Redis Pub/Sub Visualizer
An interactive simulation of Redis's Publish/Subscribe mechanism.
Clients
There are no clients yet.
Redis Server Internals
server.pubsub_channels
Data Type: `dict` (channel -> list of clients)
Purpose: Maps an exact channel name to a list of subscribed clients. This is the core engine for standard Pub/Sub. Used by `SUBSCRIBE` and `PUBLISH`.
server.pubsub_patterns
Data Type: `dict` (pattern -> list of clients)
Purpose & Use Case:
Maps glob-style patterns to clients. Use this for flexible, category-based subscriptions (e.g., all events for a specific user ID). Be aware that on every `PUBLISH`, Redis iterates through *all* patterns, which has a higher performance cost than direct channel matching.
Supported Glob Patterns:
* → any chars
? → one char
[...] → any char in set
e.g., log:[we] matches 'log:w' & 'log:e'.
e.g., log:[^i] matches 'log:w' but not 'log:i'.
server.pubsubshard_channels
Data Type: `dict` (shardchannel -> list of clients)
Purpose: (Redis 7.0+) For Pub/Sub in a Redis Cluster. Messages are only propagated within a single shard, reducing network traffic. Used by `SSUBSCRIBE` and `SPUBLISH`.