[Kamailio-Users] mysql loadbalancing

Iñaki Baz Castillo ibc at aliax.net
Fri Jan 22 00:37:28 CET 2010


El Jueves, 21 de Enero de 2010, Alex Balashov escribió:
> Iñaki,
> 
> On 01/21/2010 04:23 PM, Iñaki Baz Castillo wrote:
> > Does such mysql proxy allow prepared statements? They are stored in the
> > server, this is, when the MySQL client connects it creates the prepared
> > statements in the MySQL server.
> > If the MySQL servers restarts it looses the prepared statements so the
> > client must react and re-create them. But in the case of a mysql proxy
> > this task should take place in the proxy itself, right? Do mysql proxy
> > implement it?
> 
> My understanding is that MySQL proxy is a "low-level" proxy that plumbs
> data interchange via MySQL's internal binary protocol, not a
> higher-level representation of the RDBM backend's interface.

The problem is that if MySQL restarts, the client will not realize of it since 
the client is connected (via TCP or UNIX Socket) to the MySQL proxy, so next 
query of the client using prepared statements woudl fail as it would invoke a 
prepared statement that doesn't exist in the server.
This is, I expect that the MySQL proxy behaves like a client, more like a 
M2MUA (MySQL To MySQL User Agent) XDDDDD
 

> It is also my understanding that it creates "sticky" sessions to
> whatever MySQL server is being interacted with.  The meaning of "load
> balancing" is not that every query or statement is executed on a
> different server.  But I could be wrong.

Humm, not sure about it. When I read about these MySQL proxy some months ago, 
I remember they can dispath queries to different servers based on the query 
type (SELECT, INSERt, UPDATE...).


-- 
Iñaki Baz Castillo <ibc at aliax.net>



More information about the Users mailing list