Skip to content

High redis latency with large amount of dynamic namespaces #480

Closed
@stevebaum23

Description

@stevebaum23

We are using dynamic namespaces for our app. As users interact with different pages it creates more dynamic namespaces. While monitoring the app we noticed that the redis latency increased slowly over time and eventually got to a point where it was in the hours.

While troubleshooting the issue, we discovered the redis engine cpu got to 100% and then the latency really started to spike. We believe this is due to the high number redis pattern subscriptions (each namespace will do a pattern subscribe).

Looking through the source code it doesn't appear that namespaces ever unsubscribe when there are no sockets connected to them, so over time the number of pattern subscriptions continues to grow, until it gets to a point where the cpu can't keep up as you publish messages.

Are we using dynamic namespaces incorrectly? Are we not supposed to be using a large amount of dynamic namespaces?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions