Redis › Keyspace Notifications
What performance considerations should you keep in mind when enabling keyspace notifications on a high throughput Redis instance?
AdvancedAnswer
Enabling keyspace notifications adds a small amount of overhead to every single operation on keys matching the enabled notification types, since Redis must publish a message for each matching event, so on a very high throughput system, you should enable only the specific notification types you actually need rather than broadly enabling all possible events, minimizing unnecessary overhead.
-- Enable only the specific events actually needed
CONFIG SET notify-keyspace-events 'Ex' -- only expired events, not everythingReal-world example A high throughput application carefully enables keyspace notifications only for expired events specifically, avoiding the additional overhead that would come from broadly notifying on every single write operation across the entire dataset.