Skip to content

feat(graceful-shutdown): add preStopDelaySeconds before PROXYSQL PAUSE - #89

Open
Anton0C wants to merge 1 commit into
ProxySQL:mainfrom
Anton0C:nmi/preStopDelaySeconds
Open

feat(graceful-shutdown): add preStopDelaySeconds before PROXYSQL PAUSE#89
Anton0C wants to merge 1 commit into
ProxySQL:mainfrom
Anton0C:nmi/preStopDelaySeconds

Conversation

@Anton0C

@Anton0C Anton0C commented Aug 20, 2026

Copy link
Copy Markdown

Without a delay, PROXYSQL PAUSE closes the MySQL listener immediately while kube-proxy still routes new connections to the terminating pod:


  Pod delete                EndpointSlice update           kube-proxy
  ─────────                 ──────────────────           ──────────
  t=0  PROXYSQL PAUSE  ──►  listener closed
  t=0  (no new accepts)      pod still in endpoints  ──►  still DNATs
                                                        to pod IP
                               │
                               ▼
                         client connects ──► TCP ok ──► no MySQL greeting
                         (connect fails)

With preStopDelaySeconds:

  t=0  sleep N          pod still serving
  t=N  PROXYSQL PAUSE    endpoints updated     kube-proxy stops routing
                         (during sleep)

The delay is included in terminationGracePeriodSeconds alongside the existing drain timeout.

Without a delay, PROXYSQL PAUSE closes the MySQL listener immediately
while kube-proxy still routes new connections to the terminating pod:

  Pod delete                EndpointSlice update           kube-proxy
  ─────────                 ──────────────────           ──────────
  t=0  PROXYSQL PAUSE  ──►  listener closed
  t=0  (no new accepts)      pod still in endpoints  ──►  still DNATs
                                                        to pod IP
                               │
                               ▼
                         client connects ──► TCP ok ──► no MySQL greeting
                         (connect fails)

  With preStopDelaySeconds:

  t=0  sleep N          pod still serving
  t=N  PROXYSQL PAUSE    endpoints updated     kube-proxy stops routing
                         (during sleep)

The delay is included in terminationGracePeriodSeconds alongside the
existing drain timeout.
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b4a3da0-3d1d-476e-a609-c5bb15c98322


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sirantd

sirantd commented Aug 24, 2026

Copy link
Copy Markdown

Hit this problem too, can it be merged?

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.

2 participants