Category: MySQLProxy

MySQL Proxy RW Splitting


Contents

[edit] Read/Write Splitting

The MySQL Replication allows to scale out read-load.

To use it nicely your application has to be aware of reading data from slaves and writing data to the master. Read/Write splitting wants to automate that process inside the MySQL Proxy.

In

a Proof of Concept of that idea is presented.

[edit] Limitations

There are a few problems left before that feature is in a acceptable state:

[edit] Connection State

Up to now the example script only knows about:

Currently most of the other commands that change the connection state are ignored.

The rw-splitting.lua script has to be extended to track those statements and either:

[edit] Connection Pool

The MySQL Proxy maintains a connection pool if the scripting layer disconnects the backend from the client connection:

proxy.connection.backend_ndx = 0

The backend connection can be taken from the pool by other client connections afterwards.

For the R/W-Splitting you need 2 open connections for each client connection:

As the authentication protocol never transmits the real password nor anything we can use to authenticate against another server, we need a internal storage of credentials to open connections to the backend-servers when we are short of connections in the pool.

That's currently missing.

[edit] Bugs

Yes, we know that RW-Splitting is not for production use yet, it is a Proof of Concept. To keep track of the known issues:

Retrieved from "http://forge.mysql.com/wiki/MySQL_Proxy_RW_Splitting"

This page has been accessed 28,239 times. This page was last modified 11:56, 23 February 2011.

Find

Browse
MySQLForge
Main Page
Current events
Recent changes
Random page
Help
Edit
Edit this page
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Special pages
New pages
File list
Statistics
Bug reports
More...