List:General Discussion« Previous MessageNext Message »
From:Jenny Chen Date:August 29 2008 6:13pm
Subject:question on mysql proxy's load balancing
View as plain text  

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.

question on mysql proxy's load balancingJenny Chen29 Aug