2

I'm looking for a pooling solution for mysql that is independent of the language. I am using PGBouncer as an example because it

  1. Resides on the server the database is on
  2. Just change the connection string to use the pooling connector
  3. No modification to the code required

Is there something similiar in MySQL where I can using pooling by installing a 3rd party connector and just connect through that port?

  • suggesting we move this to dba.se – Chris Travers Jun 1 '13 at 14:20
3

This started off as a comment but it's getting a bit long.

Perhaps you could provide a better description of what it is you actually want rather than simply say it's like something else.

If you want multiple clients to use the same connection, then it must be implemented in the DBMS, otherwise you have no session management. Further you need to advise how you intend dealing with issues of state spanning more than a single request/response (i.e. transactions).

It would also be helpful to know why you want it. MySQL has a very different setup cost and per-session overhead cost compared to PostgreSQL - why do you think it needs it, and why you think it would actually yeild any benefit.

-3

Actually PGBouncer is good in pooling and distributing connections from the DB server itself, however there is MySQL-Proxy and ProxySQL (not embedded in MySQL itself) which can accomplish connection pooling and other functionalities for you. Some connectors though can have connection pooling built-in like Java Connector , check this

Also, you should be aware of this issue or problem. Say you have 10 application servers and 1 database server configured for 500 maximum connections. You set the individual application server pool sizes to 50. Now you need to add a new application server. You would have to tune all 10 of your old servers dropping their pool sizes down to make room for the new one. This problem gets more and more severe as you add more servers.

Also, tuning individual pool sizes per client means there is a chance that one server is starving while others have pooled connections sitting idle – the connections aren’t shared

  • 1
    And how does that answer the question if something similar exists for MySQL? – a_horse_with_no_name Jun 4 '14 at 14:22
  • For MySQL, data connections (your datasource) could be wrapped up into a different layer that will be responsible only for assigning connections to application servers giving the ability to distribute connections and also to share them to eliminate the idleness issue. – Muhammad Soliman Jun 5 '14 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy