dubbo A proposal of support HTTP2 connection Keepalive

zour9fqk  于 2022-10-21  发布在  其他
关注(0)|答案(5)|浏览(166)

I think we have to provide a KeepAliveManager to be used by management HTTP2 Connection, It does keepalive ping and close the connection when it does't received any response in a period of time.

It has the following benefit:

  • It could reduce the number of idle connection and system resource load.
  • It could also detect broken socket in certain service.
p4rjhz4m

p4rjhz4m1#

Aggreed !
Could you provide a description when should send a keepalive ping and when turns to IDLE ?
When sending a new request , will the connnection reconnect and turn to active?

jutyujz0

jutyujz02#

I talk about something what I understanding.

  • I thought it turns to IDLE when connection have not any active stream. and KeepAliveManager might schedule to send ping frame to keep connection alive. and stop send ping frame when connection have any active stream.
  • It would close the connection when it have not received ping ack timeout.

Aggreed ! Could you provide a description when should send a keepalive ping and when turns to IDLE ? When sending a new request , will the connnection reconnect and turn to active?

7cwmlq89

7cwmlq893#

Keepalive should not be infinite and parameters should be configurable.
At the same time, after entering the Idle state, a timeout period should be set to close the connection.

vecaoik1

vecaoik14#

It would close the connection when it have not received ping ack timeout.

Same question that if a connection has no active stream , it should be closed and reconnect when new request arrived.

zbsbpyhn

zbsbpyhn5#

Keepalive should not be infinite and parameters should be configurable.

Of cause

相关问题