----- Original Message ----- > From: "Martin Gainty" <mgai...@hotmail.com> > 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 client. 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 :-) /johan -- Unhappiness is discouraged and will be corrected with kitten pictures.