List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:July 9 2014 1:31pm
Subject:Re: Proxy / connected failover question
View as plain text  
----- Original Message -----

> From: "Martin Gainty" <mgainty@stripped>
> Subject: Proxy / connected failover question

> > >> I'm not usually an advocate of MySQL Proxy and the like, but I'm stuck
> > >> with one shitty application that utterly breaks whenever the database
> > >> goes
> > >> away unexpectedly. I can't change the application itself, so I find
> > >> myself
> > >> looking for options that allow the heathen contraption to not notice
> > >> it's
> > >> connection has switched.
> MG>how could a proxy server re-route a downed DB connection to another
> server?
> MG>does Proxy have a heartbeat on 3306 and reroute somewhere else when 3306
> connection goes silent?
> MG>exactly how does either MySQLProxy or HAProxy handle these detection and
> reroute scenarios?

Unlike a router, a proxy does not route packets; it acts as terminator for the client
connection, interprets the question and then asks that same question on a separate
connection to the actual server that it initiated itself. 

Thus, if the proxy notices that the backend is gone, it can simply establish a new
connection to the same or a different host without having to break the connection with the

It's a simple idea that works extremely well with stateless protocols like HTTP; but for a
stateful procotol like MySQL it's rather more complex :-) 

Thank you all for the input, I'll have a look at your suggestions and report back with
what I came up with :-) 


Unhappiness is discouraged and will be corrected with kitten pictures. 

Proxy / connected failover questionJohan De Meersman9 Jul
  • Re: Proxy / connected failover questionClaudio Nanni9 Jul
  • Re: Proxy / connected failover questionWalter Heck9 Jul
    • Re: Proxy / connected failover questionWagner Bianchi9 Jul
      • RE: Proxy / connected failover questionMartin Gainty9 Jul
        • Re: Proxy / connected failover questionJohan De Meersman9 Jul