3 ms·
If you aim for zero downtime there will be a point where the complexity work against you. for example: load balancer goes down, corrupted state due to two diffe
by z3t4 7y ago
If you aim for zero downtime there will be a point where the complexity work against you. for example: load balancer goes down, corrupted state due to two different versions running simultaneous, a bottleneck causing congestion, etc.
My favorite "load balancing" for web-pages is using "DNS round robin" where you add several A records, and the browser automatically try another IP if the request fails.
- nicolaslem 7y ago> ...the browser automatically try another IP if the request fails. The browser tries another IP if it cannot connect to the first one. If a server throws 500s left and right DSN RR won't help, whereas a load balancer would remove the offending server from the pool.
- SteveNuts 7y agoDNS round robin provides redundancy, not load balancing (though it ipso facto does somewhat evenly distribute requests). You really need an application aware load balancer that can detect http status codes and route around failures at the very least.
- vimslayer 7y agoZero downtime deployments is not the same as zero downtime generally ever. We deploy to production several times a day. We have an in-house product that our own emplyees use and they absolutely love that they can ask a feature in the morning and get it in a few hours (in best case scenario). That wouldn't be at all feasible if all those deployments caused errors to users. Luckily that's not a problem, because these days it's really easy to get zero downtime deployments with all this containers and "serverless" functions and whatnot.
- sneak 7y agoThe browser does not try another IP if the request fails; it tries the first one only (the DNS server chooses a random order for the response), unless browsers have changed their behavior recently. DNS round robin is not failover. If one of your four A records points to a dead box, 25% of your customers are SOL.
- z3t4 7y agoIts supported in IE, Chrome and Firefox, havent tried Safari and others. They will wait until timeout, then try the next IP. IE will give up if the second IP is down, while Firefox and Chrome will try many IPs
- duncaen 7y agohttps://en.wikipedia.org/wiki/Happy_Eyeballs https://en.wikipedia.org/wiki/Happy_Eyeballs Browsers even try other IPs and alternate between IPv4 and IPv6 before the connection is established.
- sneak 7y agoI know all about this, but most websites only support v4, and I don’t think this is used in any way for choosing which A record to use.
- duncaen 7y agoMost websites don't have redundant servers but its still there and used by a lot of big sites. The whole point of it is to connect to multiple A and AAAA records with a very short delay (250ms in chrome). The browsers use poll to get notified about the first established connection and then use it. So if one A/AAAA records IP is unreachable or slow it will use a another one. There will be no fallout (except maybe for clients that don't use something like happy eyeballs, but any browser does that) if you have multiple A/AAAA records and one of them is down.