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

feat: simplify and improve rpc TCP listener #618

Merged
merged 1 commit into from
Mar 28, 2022
Merged

feat: simplify and improve rpc TCP listener #618

merged 1 commit into from
Mar 28, 2022

Conversation

blckngm
Copy link
Contributor

@blckngm blckngm commented Mar 21, 2022

  • Use tokio bind function to simplify code and set SO_REUSEADDR. This
    also causes the socket to use a bigger listen backlog of 1024 (mio
    default) instead of 128. And this supports IPv6.

  • Set TCP keepalive interval and count too, because the default (75
    seconds, 9) is not ideal either.

  • Set TCP_NODELAY. Disabling Nagle's algorithm is usually the better
    default.

* Use tokio bind function to simplify code and set SO_REUSEADDR. This
  also causes the socket to use a bigger listen backlog of 1024 (mio
  default) instead of 128. And this supports IPv6.

* Set TCP keepalive interval and count too, because the default (75
  seconds, 9) is not ideal either.

* Set TCP_NODELAY. Disabling Nagle's algorithm is usually the better
  default.
@Flouse Flouse requested review from zeroqn and jjyr March 21, 2022 06:21
@jjyr jjyr merged commit 1bdaae7 into godwokenrises:develop Mar 28, 2022
@blckngm blckngm deleted the improve-rpc-tcp-listener branch April 6, 2022 12:32
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.

3 participants