Recently, we using mysql-proxy to transfer query request.
And also using lua script to make backend master-slave working as primary-hotstandby.
{code}
function connect_server()
local s = proxy.global.backends[1]
-- local s = proxy.global.backends[2]
if s.state ~= proxy.BACKEND_STATE_DOWN then
proxy.connection.backend_ndx = 1
-- proxy.connection.backend_ndx = 2
else
-- os.execute("/bin/mail
hao.1.ma.ext@nsn.com -s 't66 mysqld is dow' <<<'mysqld is down'")
proxy.connection.backend_ndx = 2
-- proxy.connection.backend_ndx = 1
end
end
{code}
But we met a big problem about mysql-proxy performance.
Because after doing this our service performance is very bad.
Anybody have any idea about how to do mysql-proxy performance testing or there is anyway to tune it?