DISCUSSION

releaseLinkdev.to ↗

A Kubernetes rolling update with maxUnavailable: 0 still drops requests

A rolling update with maxUnavailable 0 still dropped 20 requests after graceful shutdown and a preStop sleep. Sending Connection: close during drain took it to zero.

Perspective grid of thin gray lines on near-black with a few green and white blocks

Why we picked it · the editor's summary

Remdore ran four replicas behind a DigitalOcean load balancer, 20 keep-alive clients, and one rolling update with maxSurge 1 and maxUnavailable 0. Exiting on SIGTERM failed 51 requests; graceful shutdown cut that to 25, and a preStop sleep to 20. The rest failed when the old process exited, because the load balancer still held keep-alive connections to it, and neither refusing new connections nor sleeping touches those. Once shutdown starts, the server now sends Connection: close on every response so clients drop the connection; across more than 25,000 requests, failures went to zero. If your deploys show a handful of errors each time, check the keep-alive path before tuning probes.

Read on DEV Community ↗8m read

Comments

Loading comments…

Back to all articles