paz-sh / paz-haproxy

HAProxy load balancer for Paz that is configured from Etcd by Confd.
Other
7 stars 2 forks source link

Support TCP, not just HTTP #3

Open lukebond opened 9 years ago

lukebond commented 9 years ago

@enzor you had some ideas on this I think?

rcmorano commented 9 years ago

@lukebond HAProxy is a TCP balancer aswell, where's your limitation?

lukebond commented 9 years ago

Just a matter of getting around to learning how to do it :)

lukebond commented 9 years ago

The routing is based on HTTP host header at the moment. Not sure how else to route requests to the correct service.

rcmorano commented 9 years ago

I had some [1][2] examples saved in my pocket.com for load balancing mysql TCP connections. Hope them helps as example of HAProxy's TCP mode.

You know I had dns-sd in mind, so [if I'm understanding well what you mean by routing] I think that routing could be then delegated to the rr-dns response for a concrete service.

I'll try to illustrate it with a minimal DNS entries scaffold:

This way, apps/clients can override the need of supporting SRV records which would be used only for service discovery and the only management needed by Paz would be adding/removing entries to a DNS zone [with low TTL values].

Load balancer instances could get configured querying its own backends via a SRV record like __mysql-service-1.tcp.paz.local.

lukebond commented 9 years ago

@rcmorano thanks for the info!

with the new Docker networking stuff and my conflicted thoughts thereon (see [https://github.com/paz-sh/paz/issues/33#issuecomment-115380577]), i wonder if we need to make a decision re Docker networking before we proceed much further regarding modifications to HAProxy.