MySQL Forums
Forum List  »  Router & Proxy

Replication awarness
Posted by: Maxim Volkov
Date: September 14, 2007 11:52AM

The layout.
---------------------------
OS: Linux suse
mysql : 5.0
mysql-proxy : 0.6.0
Master --> multi-slave replication.

The mysql-proxy is used to do round robin balancing across the group of slaves (a pool like).

Lua script used :

--balancer.lua
function connect_server()
math.randomseed(math.random(0,444)*os.time());
proxy.connection.backend_ndx = math.random(1, #proxy.backends)
end

The praise
---------------------------
It is impressive how mysql-proxy achieves almost homogeneous distribution of connections across the involved servers with such minimalistic programming effort. Connections are handled in a very swift fashion freeing resources on mysql servers.

The Questions
---------------------------
How to extend mysql-proxy / lua cooperation into becoming more replication aware? (aka -- "avoid sending connections to the slave which is behind").
Any examples of general back-end aware mysql-proxy set up: number of queries presently running on the back-end, seconds behind master, COM_* counts, memory usage, cpu usage, etc.? Can configuration (mysql-proxy.conf) file be used yet (if yes, is there any relevant documentation available)?

Thank you for the participation.

Options: ReplyQuote


Subject
Views
Written By
Posted
Replication awarness
4030
September 14, 2007 11:52AM
2250
October 01, 2007 11:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.