← Back to team overview

mysql-proxy-discuss team mailing list archive

Mysql-proxy-failover

 

Hi,

I have been testing proxy failover on 0.6.1 (can't use 0.7.2 due to a
bug with 5.1.14 cummunication protocol and can't upgrade that either).

Well the setup is:

    application
         |
       proxy1
         |
         |
        / \
       /   \
  proxy 2  proxy3
     |       |
     |       |
    DB1     DB2

1. Proxy 1 is always on, but I need to restart proxy 2 and proxy 3 daily
one at a time during which i run some scripts. 
2. Proxy 2 stopped and connections move to proxy 3 (running on a single
connection here).
3. Proxy 2 is started after two minutes (from point 2) and proxy 3 is
still running
4. Proxy 3 is switched off after 2 minutes (from point 3) and
connections move to proxy 2 again
5. Proxy 3 is switched on after 2 minutes (from point 4)
6. Proxy 2 is switched off after another 2 minutes (from point 5) and
boom, connections are totally lost at this point.

The 2 minutes each time are there because I read in an old mysql-proxy
presentation pdf that each server is talken out of load balancing for 2
minutes once it is marked as dead. I can't understand why Proxy1 doesn't
connect again to Proxy3 once Proxy2 is switched off for the second time.
http://downloads.mysql.com/forge/slides/MySQL-Proxy.pdf -- page 7

Also, shouldn't proxy.backends[1].state == 1 only when the connection to
backend 1 is up? I am shutting 1 off and the state still returns 1 which
is confusing.

Any help appreciated. 
exact same thing happens with 0.7.2 btw ... 

Regards,
Darren




Follow ups