Skip to content

improve (stabilize) server rtt computation#2888

Closed
ghost wants to merge 1 commit into
masterfrom
unknown repository
Closed

improve (stabilize) server rtt computation#2888
ghost wants to merge 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jun 8, 2025

Copy link
Copy Markdown

prevent sporadic outliers from heavily affecting the server rtt

e.g. the new scoring system stops considering the server rtt when it's over 1s: just because a fast server has 2 slow responses in a row shouldn't put it in the bad server category

on the other hand this change still allows to adapt to actual slowdowns quite quickly

prevent sporadic outliers from heavily affecting the server rtt

e.g. the new scoring system stops considering the server rtt when it's over 1s: just because a fast server has 2 slow responses in a row shouldn't put it in the bad server category

on the other hand this change still allows to adapt to actual slowdowns quite quickly
@jedisct1

jedisct1 commented Jun 8, 2025

Copy link
Copy Markdown
Member

Instead of magic constants, maybe define something like

 const (
      RTTEwmaDecay         = 20.0
      RTTOutlierUpperBound = 10.0
      RTTOutlierLowerBound = 0.1
  )

Also, indentation is funky.

@ghost ghost marked this pull request as draft June 9, 2025 04:59
@ghost ghost closed this Jun 9, 2025
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant