Getting the most out of HAProxy
twilio.com
twilio.com
show stat -1 4\n
disable server xyz\n
What's not so cool? Disabling a server does nothing to kill off existing connections to that server, and idle timeouts can cause problems if your processes are slow to respond.With care, though, it's a great component of a HA solution, in addition to a being a great load balancer.
I've asked about plans to fix that and it's not on the current roadmap for 1.5.
I need multiple processes to allow SSL offloading.
haproxy -f /path/to/alternate/cfgI'd love to know more about how Twilio does SOA (and no, the linked document doesn't expand on it).
Do they use an ESB or do they rely on individual services connecting directly to each other?
I'm 100% convinced of the ideas behind a service-oriented architecture. I'm less convinced about the need for an ESB, but I'm happy to be talked around.
Experiences/Opinions/War Stories eagerly sought.
Agree that the link is kind of not-good, this might help a little... http://www.slideshare.net/twilio/highavailability-infrastruc...
I wish I could say more about our infrastructure and experience with SOA, but I'm a little limited in what I can share. We are hiring though :)
What's a "FE"?
Particularly useful when you've got a web+mc combo in one machine which can get the most out of such a setup - http://notmysock.org/blog/hacks/haproxy-user-repinning
It's so easy to filter by hostname and send requests off to different internal daemons and HAProxy is solid as a rock unlike other mechanisms I've tried.
We used haproxy to do close to zero downtime migration of our postgres servers (and other stuff) from one data centre to another recently when we moved out of our old data centre: Set up a slave in the new dc, set up haproxy with the slave as backup, point all the clients to haproxy. Shut down the master, and as soon as the master stopped responding, haproxy would shove clients to the slave in the new data centre instead. Then touch the trigger file to make the slave recover and switch to master mode.
It meant we were in read-only mode because requests where going to the slaves for about 2-3 seconds (and unlike MySQL Postgres does not allow writes to a slave until it's been promoted) before the slave started handling updates - other than that everything just chugged along.