github / glb-director

GitHub Load Balancer Director and supporting tooling.
Other
2.37k stars 227 forks source link

question about proxy failure #59

Closed cheneydeng closed 5 years ago

cheneydeng commented 5 years ago

Glad to read your blog post about "Github Load Balance",That post said GLB will not disrupt any connection in any condition,in my opinion,the addition and remove of proxy is ok,because the existence connection data flow will be handled by the old primary(the new secondary),but what if the primary fail,I don't see how the primary sync with secondary about connection state information,will the connection be terminated on secondary?

theojulienne commented 5 years ago

That post said GLB will not disrupt any connection in any condition

To clarify, if a machine fails, the connections that are terminated on that machine will obviously fail, because the state in the Linux kernel for the connection and the application level state in haproxy, nginx, or whatever service is also gone. GLB doesn't prevent this.

What GLB does is ensure that on a single host failure, no other connections are disrupted as connections are redistributed. In addition, if the primary is drained rather than hard-failed, GLB will gracefully drain it of connections, rather than breaking any of them.

cheneydeng commented 5 years ago

To clarify, if a machine fails, the connections that are terminated on that machine will obviously fail, because the state in the Linux kernel for the connection and the application level state in haproxy, nginx, or whatever service is also gone. GLB doesn't prevent this.

Thanks for clarifying that.