-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Measure the latency of the different "happy" scenarios #62
Comments
What happens (currently)Today, sequenceDiagram
participant E as Envoy
participant L as Limitador
box grey Cloud provider's Redis-alike
participant R as Redis
end
E->>+L: should_rate_limit?
L->>R: MGET
R->>L: counter values
loop for every counter
L->>R: LUA script increment
R->>L: ()
end
L->>-E: Ok!
So say you have 3 limits (per hour, per day and per month) and your user is currently not above the threshold of these 3 limits, we'd need to do 4 round-trips to Redis to let them thru and increment the counters. Based on the testing above, we can fairly much confirm that a single round-trip to Redis is about the figures from cloudping. What we could do about it (for now)Improve on the current designInstead of going to Redis Leverage the existing
|
Obviously, the list above are small improvements for us to get closer to something sustainable in such a deployment. Probably some better caching strategy (rather than time based expiry), e.g. Hi/Lo, would be preferable, as we know we are dealing with counters that tends towards a known limit. And eventually get to completely avoid the need for coordination across the different limitador, probably by leveraging CRDTs, like a grow-only counter. |
In order to better understand the implications of leveraging the cloud providers Redis instances, we want to build a latency distribution matrix for all the different providers, but starting our with AWS's Elasticache.
We need a distribution for a LRT that:
We then need to test these in multiple deployment scenarios:
That use:
Performance tests
Latencies in multiple deployment scenarios
Using cloudping as latency data source
eu-north-1 (Stockholm) -- > eu-central-1 (Frankfurt) ~36ms #79us-east-1 (N. Virginia) -- > us-west-1 (N. California) ~75ms #80eu-west-1 (Ireland) -- > us-west-2 (Oregon) ~126ms #81ap-east-1 (Asia Pacific Hong Kong) -> ca-central-1 (Canada Central) ~209ms #82ap-southeast-2 (Asia Pacific (Sydney)) -> eu-north-1 (Stockholm) ~295ms #83ap-southeast-2 (Asia Pacific (Sydney)) -> af-south-1 (Africa Cape Town) ~417ms #84EDIT: no need to test further. We confirmed expected understanding of limitdor's request to redis model. The
N+1
model.Scenarios with transient gw &
redis_cached
Scenario with write-behind-lock Kuadrant/limitador#276
The text was updated successfully, but these errors were encountered: