Skip to content
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

fix: ensure that pings don't get stuck behind writes #71

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Jan 6, 2022

This:

  1. Sets the max message size to 4 KiB. That should be large enough to fill up most packets. I had to revert this to get the tests passing.
  2. Sends pings/pongs first before processing messages.

This ensures that:

  1. RTT times are accurate.
  2. We don't end up thinking the connection is dead because a ping keeps getting stuck behind a message.

@Stebalien
Copy link
Member Author

Sets the max message size to 4 KiB. That should be large enough to fill up most packets.

I think this was causing problems, but I'm not sure... Testing now.

This sends pings/pongs first before processing messages.

This ensures that:

1. RTT times are accurate.
2. We don't end up thinking the connection is dead because a ping keeps
   getting stuck behind a message.

I tried lowering the max message size to 4KiB, but that broke tests due
to a perf regression. Although I'm not sure how "real" that perf
regression is.
@Stebalien Stebalien merged commit 3a390d9 into master Jan 11, 2022
@Stebalien Stebalien deleted the fix/ping-latency branch January 11, 2022 07:26
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.

None yet

2 participants