Database Connections & HAProxy

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Squiffy
Posts: 108
Joined: Mon May 02, 2016 9:50 am
Location: UK
Contact:

Database Connections & HAProxy

Post by Squiffy »

Out of pure curiosity I'm going to be playing with a Galera cluster at some point, probably with HAProxy handling the distribution of DB connections to the server farm (http://severalnines.com/tutorials/mysql ... y-tutorial).

It's an experiment - I'm just curious and I'm on shaky ground I know.

Am I right in assuming that AwareIM uses connection pooling? If so (and this is where I'm on particularly shaky ground) does my application only make one connection to the DB unless it has cause to reconnect due to a server reboot or something like that? My limited understanding of Java's connection pooling (gained from sites like this : http://www.javaranch.com/journal/200601 ... oling.html suggests that to be so and I therefore conclude that my load distribution would be ineffective as HAProxy would not be receiving new connections to distribute.

Curious to know what others think.
Image
David Wylie
Server : Linux (Centos 7), Client : Windows 10, db : MariaDB
"...a dreamer, a thinker, a speculative philosopher... or, as my wife would have it, an idiot."
Post Reply