Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Jenny Chen (luojiacgmail.com)
Date: Fri Aug 29 2008 - 13:13:23 CDT
When I read Jk's document on MySQL proxy:
In Load balancing part, he mentioned that:
"We use SQF (shortest queue first) to distribute the load across the
backends equally. Each backend will get the same number of connections."
My understanding is that if there are 100 concurrent client connecting to
the myql proxy with two backend mysql server(master and slave), the mysql
proxy will send 50 connections to the master server, and the other 50
connections to the slave server, is my understanding correct?
But I did observed very different in the simple mysqlslap test:
mysqlslap -hproxy-host -P4040 -q ./simple.sql -c 100 -i
( ./mysql-proxy --proxy-backend-addresses=master-host:3306
on the master server, from the processlist, I saw "Threads-creates" arround
166, but "threads running/connected" only 12; on the slave server,
"Threads-creates" arround 166, but "threads running/connected" only 1. Does
anyone can please explain why this happening?
(And the mysqlslap test result was very poor compared to the same test
without mysql proxy and connecting to only one mysql server instance.)
Thanks in advance for your information.