4 ms·
How do you load balance? i mean load balance the "public ip" In some networks DNS failover is really not that great, so at least a virtual ip needs to be used.
by merb 8y ago
How do you load balance? i mean load balance the "public ip"
In some networks DNS failover is really not that great, so at least a virtual ip needs to be used.
- takeda 8y agoWe use haproxy. I wrote code [1] that configures it based on Consul to do load balance. It has been running in production for 2 years without issue (tested with consul 1.0.6) For people wondering why not use consul template, this has benefit of understanding haproxy, and it minimizes numbers of restarts to make changes. Using haproxy over and has the benefit that if Winkle or consul goes down things continue to work, just not updates. [1] https://github.com/takeda/winkle https://github.com/takeda/winkle
- merb 8y agoHaproxy only solves a single Part of the Problem. If you do DNS based failover you should really Check how clients behave, when one node goes down. Without a floating ip or a cloud lb, some stuff will be troublesome
- takeda 8y agoThe haproxy method doesn't rely on DNS at all so I'm a bit confused.
- merb 8y agowell either it uses DNS for failover or you have ipvs (lvs, keepalived) enabled or worse if the machine with haproxy crashes your basically dead. Of course there is also bgp and anycast, but this is not "cheap"
- takeda 8y agoThat's not how it works. It is very similar to sidecar approach which various service discovery solutions have. You have haproxy running locally on localhost and you communicate with it, the haproxy then routes the request to right nodes. No DNS, no LVS and no keepalived.
- merb 8y agowell I've talked about edge Load Balancing..