Skip to content

HTTP2: HttpClient does not respond to pings after GOAWAY when some streams are still active #29889

@krwq

Description

@krwq

After client receives GOAWAY it should still respond to PING as long as there are any streams open.

Details:

  • GOAWAY frame contains two parameters: streamId => always 0, lastStreamId > last stream server can take action on (this means the streams with lower or equal number than that should still continue)
  • GOAWAY tells that connection is that server no longer wishes for new streams to be open on the same connection and that client should not respond to frames with higher id than lastStreamId
  • PING per rfc should be treated with high priority and should be responded to

This behavior seem to not be explicitly defined in the spec (at least I could not find any mentions) but:

  • spec says that communication on streams with lower stream ids than last stream id should continue (GOAWAY and PING are both not tied to specific stream id but ID they send frame to is lower than lastStreamId)
  • after GOAWAY is send it is particularly important to respond to pings as it seems it may be used by server to determine if client immediately went away or not
  • we currently respond to still active streams but not on streamless frames like PING
  • not responding to PING means that active stream might be unnecesarily closed and will need to be retried on the new connection

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions