You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- implementation on #5361 was improved and reaches more throughput now
- all measurements run for 300s
- more detailed explanation how to determine max throughput
- some more arguments for replacing nginx by a dedicated CAPI router
Copy file name to clipboardExpand all lines: decisions/0016-rate-limiting.md
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,11 +29,11 @@ CF API rate limiting should be moved from CCNG (Ruby process) into a dedicated r
29
29
30
30
### Short-term
31
31
32
-
A single user can't overload the CF API anymore by running more parallel requests than the CC api VMs can process. The CF API is protected up to ~750 req/s (~1.8k with token caching) per CC VM (max 429 response rate).
32
+
A single user can't overload the CF API anymore by running more parallel requests than the CC api VMs can process. The CF API is protected up to ~2.2k req/s per CC VM (max 429 response rate).
33
33
34
34
### Long-term
35
35
36
-
The protection level can be increased at least by factor 4.
36
+
The protection level can be substantially increased (we expect at least factor 2).
37
37
38
38
CCNG is offloaded by token decoding/validation and rate limiting middleware. We may be able to remove Redis/Valkey from CCNG which was introduced because of rate limiting.
39
39
@@ -47,14 +47,15 @@ Downside is the implementation and testing effort but we also gain full control
The max measured 200 response throughput for this test setup is ~189 req/s (= 56,700 200 responses in 300s).
159
160
160
-
- TODO: Update data. Some tests were run until reaching 40k 200, should rerun for 300s with fixed-window rate limiter set to very high limit so that we get comparable results.
161
+
The table shows the highest achievable attack request rate for which the CF API is still working stable:
162
+
- no 5xx responses
163
+
- achieves at least 90% of the max 200 responses (~51k 200 responses in 300s, ~170 req/s).
(2) Baseline uses fixed-window rate limit with limit 0 instead of concurrent request rate limiter
183
184
184
185
## Additional Information
185
186
186
-
The rate limiter protection performance (i.e. which max load can be responded with 429) can be further improved by caching tokens that have been validated and decoded. This applies to all implementation options. POC was only done for CCNG middleware.
187
+
The rate limiter protection performance (i.e. which max load can be responded with 429) can be further improved by caching tokens that have been validated and decoded. This applies to all implementation options.
187
188
188
-
Max nginx response rate is ~8..10k req/s per CC api VM (static response by nginx w/o token decoding and rate limiting). It might be possible to increase it further by tuning nginx configuration.
189
+
Max nginx response rate is ~8..10k req/s per CC api VM (static response by nginx w/o token decoding and rate limiting). It might be possible to increase it further by tuning nginx configuration. This indicates that a CAPI specific and properly optimized rate limiting implementation outside of CCNG can provide a higher protection level than an implementation within CCNG.
0 commit comments