Skip to content

Set Connection: close header in HTTP responses when closing #127984

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

Closed
DaveCTurner opened this issue May 9, 2025 · 2 comments · Fixed by #128025
Closed

Set Connection: close header in HTTP responses when closing #127984

DaveCTurner opened this issue May 9, 2025 · 2 comments · Fixed by #128025
Labels
:Distributed Coordination/Network Http and internode communication implementations >enhancement Team:Distributed Coordination Meta label for Distributed Coordination team

Comments

@DaveCTurner
Copy link
Contributor

DaveCTurner commented May 9, 2025

As of #96363 a shutting-down Elasticsearch node will close HTTP connections as soon as they become idle. However if the client is using HTTP pipelining then it may be able to keep the connection open indefinitely without knowing that the node is trying to shut down.

We should set the Connection: close header on responses sent after we start to shut down so that the client can react by stopping its use of the connection to the shutting-down node, even if it is pipelining requests.

@DaveCTurner DaveCTurner added >enhancement :Core/Infra/REST API REST infrastructure and utilities labels May 9, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label May 9, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this issue May 12, 2025
Lets clients using HTTP pipelining know to cease usage of connections to
shutting-down nodes.

Closes elastic#127984
@DaveCTurner DaveCTurner added :Distributed Coordination/Network Http and internode communication implementations and removed :Core/Infra/REST API REST infrastructure and utilities Team:Core/Infra Meta label for core/infra team labels May 12, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Coordination Meta label for Distributed Coordination team label May 12, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

elasticsearchmachine pushed a commit that referenced this issue May 18, 2025
Lets clients using HTTP pipelining know to cease usage of connections to
shutting-down nodes.

Closes #127984
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this issue May 18, 2025
Lets clients using HTTP pipelining know to cease usage of connections to
shutting-down nodes.

Closes elastic#127984
elasticsearchmachine pushed a commit that referenced this issue May 18, 2025
Lets clients using HTTP pipelining know to cease usage of connections to
shutting-down nodes.

Closes #127984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Network Http and internode communication implementations >enhancement Team:Distributed Coordination Meta label for Distributed Coordination team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants