Skip to content

Clustered rate limiters #5800

Description

@mperham

If using many thousands or even millions of rate limiters, it can be hugely beneficial to use a Cluster as the rate limiter storage in order to scale beyond one Redis instance. We can modify the rate limiter data model to take advantage of "Hash tags" in the cluster spec1 to ensure all keys for a limiter X resides on the same Redis instance within the cluster. This ensures that any related Lua script will have local data to work with when running within Redis.

Note that the Web UI functionality is not cluster-friendly; it uses SCAN to look for all limiters to list but but this will only scan one Redis instance. Nevertheless, for the largest users this limitation on visibility (who's using the Web UI to look at millions of limiters??) is a reasonable trade off to enable massive scale.

cc @sj26

Footnotes

  1. https://redis.io/docs/reference/cluster-spec/ ↩

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions