Streamer: swap governor crate with TokenBucket#8740
Streamer: swap governor crate with TokenBucket#8740alexpyattaev merged 1 commit intoanza-xyz:masterfrom
Conversation
d6cac0d to
eba17f2
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8740 +/- ##
=========================================
- Coverage 83.2% 83.2% -0.1%
=========================================
Files 863 863
Lines 373947 373921 -26
=========================================
- Hits 311236 311184 -52
- Misses 62711 62737 +26 🚀 New features to boost your workflow:
|
|
Extra context: This PR addresses the regression by bumping number of connections per IP for test-validator setups Full partition: All CI partitions of local-cluster complete in <10 min. |
There was a problem hiding this comment.
Bumping the max_connections_per_ipaddr_per_min way up to avoid tests ever flaking in the future due to ratelimits.
eba17f2 to
19dd910
Compare
|
Have no context beyond the previously slow CI test. Will defer to @lijunwangs for the review. |
@apfitzge can you point to the slow CI test link? Thanks |
https://discord.com/channels/428295358100013066/560503042458517505/1430348086042951722 |
19dd910 to
d1941ff
Compare
| let quic_server_params = Arc::new(quic_server_params); | ||
| let rate_limiter = Arc::new(ConnectionRateLimiter::new( | ||
| quic_server_params.max_connections_per_ipaddr_per_min, | ||
| // allow for 10x burst to make sure we can accommodate legitimate |
There was a problem hiding this comment.
Should we do this only to test? Would this make our rate limiting ineffective against abusive clients?
There was a problem hiding this comment.
It will not. If someone is truly abusive they will exhaust this very quickly, and sustained attack will be stopped, as intended.
| pub fn new_for_tests(tpu_enable_udp: bool) -> Self { | ||
| let tpu_quic_server_config = SwQosQuicStreamerConfig { | ||
| quic_streamer_config: QuicStreamerConfig { | ||
| max_connections_per_ipaddr_per_min: 32, |
There was a problem hiding this comment.
was this test trying to create > 32 connections per minute? Seems suspicious. I think this should be investigated as a spin-off in a new issue to avoid blocking progress on the current change
There was a problem hiding this comment.
I did not dive too deeply into test_run_test_load_program_accounts_root. However now that we allow a larger initial burst it should not be necessary to patch new_for_tests.
d1941ff to
98f53cf
Compare
add burst handling to the per-IP rate limiter This should allow legit container users to connect without triggering ratelimits more easily
98f53cf to
d0874c8
Compare
|
Had to rebase due to conflicts + clean up commit messages. |
swap governor crate with TokenBucket add burst handling to the per-IP rate limiter This should allow legit container users to connect without triggering ratelimits more easily
Problem
Summary of Changes
CONTEXT
https://discord.com/channels/428295358100013066/560503042458517505/1430348086042951722