News for hackers. Stuff that matters.
Re:HAproxy in the era of Microservices by kkamperschroer on Monday October 26, 2015 @10:51AM (#10451829)
Using consul (https://www.consul.io/) in conjunction with HAProxy is another great way for service discovery and routing.
Re:HAproxy in the era of Microservices by imdsm on Monday October 26, 2015 @11:13AM (#10451959)
Yep, Consul-template + HAProxy is great for a dynamic HAProxy solution.
Re:HAproxy in the era of Microservices by jolynch on Monday October 26, 2015 @12:14PM (#10452333)
Has anyone actually done this at scale and seen how it works? We've talked about it a few times because Consul looks really cool but it doesn't appear to have the full capabilities of SmartStack yet, in particular Synapse (https://github.com/airbnb/synapse) for intelligently doing stats socket updates, intelligent reloads, or controlling how HAProxy reloads over time.

Also consul only has two levels of services right, "local" and "remote"? I'm not sure that is sufficiently powerful to describe SOA's which need to be able to differentiate services on the machine, rack, colo, datacenter, region locality? I suppose you could do what we do in SmartStack and just register the same service instance at a few different places since I think that consul can register arbitrary services.

Maybe all we need is a consul watcher in Synapse, and a consul-template for the Synapse configs, and we can get the best of all worlds. With Linux 4.4 SYN handling in Linux might even be fixed by Eric Dumazet being super hardcore (e.g. https://lwn.net/Articles/659199/) and we won't even have to worry about reloading HAProxy.

Re:HAproxy in the era of Microservices by awinder on Monday October 26, 2015 @01:54PM (#10453044)
Services in consul are datacenter aware and there's a tagging concept that you could utilize for something rack or region.
Re:HAproxy in the era of Microservices by magiconair on Monday October 26, 2015 @02:42PM (#10453466)
https://github.com/eBay/fabio might also be an option for you.

Disclosure: I'm the author.

Re:HAproxy in the era of Microservices by imdsm on Tuesday October 27, 2015 @05:02AM (#10456919)
That looks interesting. I'll check it out. Thanks!
Re:HAproxy in the era of Microservices by sandstrom on Monday October 26, 2015 @05:24PM (#10454599)
Looks really interesting. Will try it out!
Re:HAproxy in the era of Microservices by znep on Monday October 26, 2015 @03:08PM (#10453664)
As long as you don't have too many microservices... the polling and templating doesn't scale too well.

This is related to https://github.com/hashicorp/consul-template/issues/165#issu... although that is even more extreme.

Re:HAproxy in the era of Microservices by imdsm on Tuesday October 27, 2015 @05:01AM (#10456914)
Well it depends on how you implement it. I wouldn't imagine that each microservice has it's own haproxy-consul-template router. If it did, then sure, you're going to swamp it.

Maybe I'm not understanding the situation correctly, and granted, I've not ran it on a cluster of more than 5 machines with more than 10 microservices as we decided to use Rancher instead.