Skip to content
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

Graceful shutdown not well integrated with ProxySQL #58007

Closed
dveeden opened this issue Dec 5, 2024 · 3 comments
Closed

Graceful shutdown not well integrated with ProxySQL #58007

dveeden opened this issue Dec 5, 2024 · 3 comments
Labels
component/server type/enhancement The issue or PR belongs to an enhancement.

Comments

@dveeden
Copy link
Contributor

dveeden commented Dec 5, 2024

Enhancement

The graceful-wait-before-shutdown option was added in TiDB to allow for graceful shutdown of sessions.

This was intended to:

  • Signal shutdown to proxys/loadbalancers/applications
  • Allow for existing connections to continue to function until the timeout is hit

The problem with this is:

  • ProxySQL doesn't detect the shutdown
  • ProxySQL keeps sending new connections to the server
  • Eventually the timeout hits and connections are dropped

Possible solutions:

  1. Get ProxySQL to detect the shutdown without modifying TiDB (See https://github.com/dveeden/proxysql-tidb )
  2. Make use of existing ProxySQL behavior to signal the shutdown (e.g. no longer respond OK to a ping) (see server: return error on ping when in graceful shutdown #58008 )
  3. Make it easier for ProxySQL to detect the shutdown signal. This could be done by adding a server_health or shutting_down global variable.
@dveeden dveeden added component/server type/enhancement The issue or PR belongs to an enhancement. labels Dec 5, 2024
@dveeden
Copy link
Contributor Author

dveeden commented Dec 5, 2024

cc @renecannao

@djshow832
Copy link
Contributor

It seems ProxySQL doesn't support a customized port(10080) to check the health?

@dveeden
Copy link
Contributor Author

dveeden commented Jan 2, 2025

Closing this as #58008 was merged

@dveeden dveeden closed this as completed Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/server type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants