Using proxy server to redirect MySQL traffic to multiple servers using standard port?
- by FrenchFry
Is it possible to redirect MySQL (tcp) traffic to multiple servers based on domain name alone?
Our DNS is setup to point several sub-domain aliases to one proxy machine. (running haproxy and iptables). We would like to redirect all database traffic through this proxy server and route it to the appropriate db server, WITHOUT deviating from the standard MySQL port.
dev.domain1.com:3306 -- dbDevServer.domain1.com:3306
test.domain1.com:3306 -- dbTestServer.domain1.com:3306
prod.domain1.com:3306 -- dbProdServer.domain1.com:3306
Thanks!