Using the KEDA scaler with Redis Streams: Ideal Usage Question #2043
Unanswered
nakumgaurav
asked this question in
General
Replies: 1 comment
-
I think, we need count of not delivered entry count for auto scaling metrics like this.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[Continuing the discussion from #746 ]
Problem:
If I have an application adding messages to a stream, they are not delivered to any consumer group until an
XREADGROUP
is issued over that consumer group. This means that if the Job that KEDA is trying to scale consumes messages, it has to wait for someone to consume messages (!!!) usingXREADGROUP
so that the messages are moved to the Pending Entries List (PEL) of that group. This leaves Redis Streams pretty much useless with KEDA because if some other application has already fetched the messages, how would I retrieve them in my KEDA application that I am trying to scale?I guess this is more related to how Redis consumer groups work but if there is a KEDA way of doing things, would love to hear that.
Potential Workaround:
What I ended up doing was:
XINFO GROUPS
XREADGROUP
to deliver messages to all the groupsXPENDING
and read the messages in this range usingXRANGE
XACK
so that they are removed from the PEL of the group and more messages could be received.I realize this may not be the ideal way to solve the problem, so open to suggestions. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions