Connection pooling confusion

Asked by Tobi Nisgod

I'm very confused as to whether or not (and how) MySQL Proxy supports connection pooling.

On the MySQL site it says "Yes" with no more info. On this site there's an out-of-date script that provides pooling. --help-all shows a pool related option (--proxy-pool-no-change-user) but no other info.

The only thing I know for sure is that on version 0.8.2, "mysql-proxy --proxy-backend-addresses=127.0.0.1:3306" gives no connection pooling.

Help! Am I missing something? Do I need to update John Loehrer's script?

Question information

Language:
English Edit question
Status:
Solved
For:
MySQL Proxy Edit question
Assignee:
No assignee Edit question
Solved by:
Tobi Nisgod
Solved:
Last query:
Last reply:
Revision history for this message
Tobi Nisgod (tobinisgod) said :
#1

Just found the ro-pooling.lua script. Appears to do what I'm after. We I first reviewed the scripts I assumed "ro" meant read only. Still not sure what it does mean, but doesn't appear to mean read only.

Maybe someone with an understanding of these scripts / lua could spend 10 minutes putting together some simple explanations. I've spent a couple of days looking at this; if it didn't seem to fit my requirements so well, I'd have been put off by the mess of info available.

Revision history for this message
Nicholas Tang (nicholastang) said :
#2

Tobi,

How did you get connection pooling to work? Anything special required? And did it in fact pool the connections (i.e. reduce the number of connections to the back-end DB)?

Thanks! :)

Revision history for this message
Tobi Nisgod (tobinisgod) said :
#3

Nothing special required. Fired up mysql proxy with the ro-pooling.lua script. Started a few mysql sessions and watched show processlist to see the connections persist.

Regards the "ro-" part of the name, I concluded that it does stand for read only. Although this is not coded into the script, the script makes no attempt to handle open transactions, locks, etc.