Hacker News new | past | comments | ask | show | jobs | submit login

Another approach: have haproxy fork/exec a child, inheriting the same file descriptor for the listening socket, then have the child tell the parent when it should stop accepting connections on that socket.

No idea how that works in practice, but it seems like a sound concept? :)




Yes, that's how Unicorn works. But HAProxy isn't designed to inherit another process's current state (see this other comment: https://news.ycombinator.com/item?id=9371064), and it's probably quite complicated and error-prone.

If you're going down that route, it's probably much easier to write the code required to simply re-read the config and apply a diff to the internal data structures.


A less fragile approach would be for the old process to simply pass the listen fd to the new process over a unix socket. You could also pass any active connections in this way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: