Skip to content

fix(gcp): detect dead API connections after egress address removal - #181

Open
maxenced wants to merge 1 commit into
doitintl:masterfrom
maxenced:fix/gcp-dead-connection-detection
Open

maxenced wants to merge 1 commit into
doitintl:masterfrom
maxenced:fix/gcp-dead-connection-detection

Conversation

@maxenced

Copy link
Copy Markdown

The agent removes the instance's ephemeral access config, then polls that operation with zoneOperations.wait on the pooled HTTP/2 connection to the Compute API. That connection was opened while the instance still egressed through the ephemeral address, so it stops carrying traffic as soon as the address is gone, without any error. The Google API client only probes a silent connection after 31 s (transport/http ReadIdleTimeout), so every node start spent ~31 s idle before the existing retry re-issued the request on a fresh connection, while the operation itself completed in 6-8 s.

Build the Compute client on a transport with aggressive HTTP/2 health checks (PING after 2 s of silence, 2 s to answer) so a dead connection is dropped in about 4 s and the operation wait retries right away. Log the transport retry at debug level so the delay is visible.

Fixes #180

The agent removes the instance's ephemeral access config, then polls that
operation with zoneOperations.wait on the pooled HTTP/2 connection to the
Compute API. That connection was opened while the instance still egressed
through the ephemeral address, so it stops carrying traffic as soon as the
address is gone, without any error. The Google API client only probes a
silent connection after 31 s (transport/http ReadIdleTimeout), so every node
start spent ~31 s idle before the existing retry re-issued the request on a
fresh connection, while the operation itself completed in 6-8 s.

Build the Compute client on a transport with aggressive HTTP/2 health checks
(PING after 2 s of silence, 2 s to answer) so a dead connection is dropped in
about 4 s and the operation wait retries right away. Log the transport retry
at debug level so the delay is visible.

Fixes doitintl#180

This branch has not been deployed

No deployments
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.

GCP: ~31 s stall after removing the ephemeral address, caused by the HTTP/2 connection health check on the reused API connection

1 participant