True Zero Downtime HAProxy Reloads: An Alternative Approach
Created on 2023-02-05T17:25:24-06:00
- Segregate server instances in to a red and blue group
- Bring the daemon of the opposing color online
- Use iptable rules to direct incoming traffic to the current daemon color
- Repeat the process, switching colors every time a reload is needed.
This method is simpler than Yelp's method of routing TCP SYN requests to a plug queue but does seem to add a minor amount of latency to route *all* traffic through iptable rules at all times. Unbounce likes this method because it allows for daemon restarts that take too much time to hold a request in flight.