Repository navigation
fix(server/impl): rate limit latent event acks separately - #4246
Open
manzarek123 wants to merge 1 commit into
Open
manzarek123 wants to merge 1 commit into
manzarek123 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Acks for server-to-client latent events arrive through the same
msgReassembledEventV2handler as client-sent fragments, so they consume thelatentEventlimiter (75/s, burst 125). The client acks every fragment it receives, so a transfer above ~150 KB/s exceeds that limit. The excess acks are silently dropped, and the server keeps resending fragments the client already has. Large latent events become much slower and waste bandwidth.Fix: check the limiters after parsing, and give acks their own
latentEventAcklimiter (1000/s, burst 2000, configurable throughrateLimiter_latentEventAck_rate/_burst). Acks over the limit are dropped silently, never kicked. Client-sent fragments keep the existinglatentEvent/latentEventFloodlimits unchanged. Malformed packets no longer consume any budget.This PR applies to the following area(s)
Server
Successfully tested on
36897
Platforms: Windows
Checklist
Fixes issues
#4244