Skip to content

Pub/Sub when system memory is maxed out #13252

Closed Answered by sundb
ilshm asked this question in Q&A
Discussion options

You must be logged in to vote
  1. How Redis allocates and manages memory for processing large pub/sub messages.

Redis will send a pub message to every connection.

  1. What happens if a pub/sub message is received when Redis is operating at or near the maxmemory limit? Does this situation affect the triggering of the LRU eviction mechanism?

since pubscribe/subscribe are non-writable, they aren't limited by maxmemory.
LRU is for keyspace, but pub/sub doesn't generate any dataset, so pub/sub is not affected by eviction.

  1. Are there any best practices for configuring Redis in environments where frequent large pub/sub messages are common and memory is a constraint

what version are you using? if > 7.0, you can use client …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ilshm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants