helm-charts
helm-charts copied to clipboard
[mariadb] Opt-in for Graceful shutdown
When mariadb receives the term-signal, it will cancel all outstanding transaction, which gives the clients no time to gracefully handle the situation
When enabled, the mariadb pod will poll in the preStop hook the number of external non-replication connections, and shut down when they are zero or when a timeout period has been reached.
Since that depends on the client behaviour, this is an opt-in
I think, the main question is, how to handle backups? They are rather long-running processes, and this graceful shutdown would close the database for new connections (so essentially having it down) until the backup or other long running connections are closed.
I think, the main question is, how to handle backups? They are rather long-running processes, and this graceful shutdown would close the database for new connections (so essentially having it down) until the backup or other long running connections are closed.
What options do we have? I see a) Wait for the graceful shut down time and hope the backup finishes, interrupting it (like now) if it doesn't. This gives us longer downtime b) Ignore backup connections during the graceful shutdown check. This gives shorter downtime and interrupts the backups (like now) c) Add an additional timeout after which we ignore backup connections. not sure how sensible that is, but would allow more fine-tuning
I'd go with b, I guess.