Skip to content

feat(h2): use a more reasonable timer for keep alive timeout in h2#1191

Open
joelwurtz wants to merge 1 commit intoHFQR:mainfrom
joelwurtz:feat/keep_alive_timeout
Open

feat(h2): use a more reasonable timer for keep alive timeout in h2#1191
joelwurtz wants to merge 1 commit intoHFQR:mainfrom
joelwurtz:feat/keep_alive_timeout

Conversation

@joelwurtz
Copy link
Copy Markdown
Contributor

I was looking at why the keep alive h2 test was running for so long (5 sec)
and this was the * 10 mult on duration that was causing this.

I'm not sure this a good default, and maybe it should be configurable, in fact in h2, it may need 2 different duration configurable:

  • keep_alive_idle_timeout : which is the duration to wait to launch keep alive (ping pong) check after no more requests are received (it's the current value of keep_alive_timeout)
  • keep_alive_timeout : which is the duration to wait for a ping pong response from the client (currently equal to keep_alive_timeout * 10 - keep_alive_timeout)

@joelwurtz joelwurtz force-pushed the feat/keep_alive_timeout branch from 9cd7a6a to 0168e11 Compare February 2, 2025 13:01
@joelwurtz joelwurtz force-pushed the feat/keep_alive_timeout branch from 0168e11 to dab8ed7 Compare January 13, 2026 13:36
@fakeshadow
Copy link
Copy Markdown
Collaborator

There is some behavior change in xitca-http 0.9.0 where the ping-pong is running in a fixed interval instead of only when idle. I would suggest using a higher value as default if the default 5 seconds is too harsh.

I would push a fix later to resort the behavior to prior 0.8

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.

2 participants