3 ms·
At my company, every server has its own internal load balancer (previously haproxy, now nginx). While definitely possible, I don't think sharing a single file a
by josegonzalez 10y ago
At my company, every server has its own internal load balancer (previously haproxy, now nginx). While definitely possible, I don't think sharing a single file across hundreds of boxes is a "best practice".
That said, this certainly would work for companies with a ton of money to burn (nginx+ licenses aren't cheap) or who are at smaller scales. If it works, ship it!
- nodesocket 10y agoYou really shouldn't need more than a handful of load balancers (may one or two in a few different availability zones for HA). You can even pay Amazon and NGINX hourly using the NGINX Plus AMI[1]. [1] - https://aws.amazon.com/marketplace/pp/B00A04GAG4/ https://aws.amazon.com/marketplace/pp/B00A04GAG4/
- closeparen 10y agoOne way to handle "service discovery" is to assign a distinct port to every service, run an haproxy on every host, and always make cross-service calls through localhost:port. Health checks and config management keep the haproxies up to date, and applications don't have to know which hosts to ring. Having only a handful of load balancers forces all your internal traffic through a handful of bottlenecks and points of failure, and you still need custom logic in your applications to try another load-balancer when the primary is dead.