Using MySQL slaves for tracker's read-only queries
Renato Pinheiro F. L. Lucindo
renato.pinheiro at corp.globo.com
Wed Aug 22 17:15:29 UTC 2007
Having a MySQL setup with one master any some (more than one) slaves I want to be able to use these slave MySQL servers for tracker's selects. Any thoughts on how to do this?
I think in two possible ways:
1) Using "read-only" trackers.
Configure some trackers to access one slave server and set the configuration to:
delete_jobs = 0
replicate_jobs = 0
reaper_jobs = 0
And make sure (app. side) that only GET_PATHS requests are sent to the listener.
The other trackers will be configured to access the master MySQL and should run all subprocess (replicate, delete, reaper), and receive all kind of requests.
2) Using MySQL Proxy
Run a MySQL-Proxy (http://forge.mysql.com/wiki/MySQL_Proxy) with each tracker. Configure the proxy to have access to all MySQL servers (marter and slaves). Use some Lua config. to split read and write queries as in: http://jan.kneschke.de/2007/8/1/mysql-proxy-learns-r-w-splitting
Someone did something like this?
More information about the mogilefs