andye has asked for the wisdom of the Perl Monks concerning the following question:
I'm converting an existing web application to a cloud environment.
I need to do failover / load balancing for the MySQL database connection.
One option I'm looking at is doing that from within Perl. (I'm aware that there are other options such as HAProxy etc - they have their pros and cons).
So, Perl module options for load balancing with failover for non-responsive connections seem to be:
Q1: Does anyone know of any other options?I'm aware that each of these modules is designed for a slightly different scenario, but in fact any of them would fit the bill for my scenario, which is:
- One connection for writing to the database (failover on this connection is managed by Amazon RDS, so we don't need to worry about that).
- A set of connections for reading from replicas of the database. These connections need to be load-balanced, and if one of them fails then we need to take it out of the pool.
I have no experience using any of the above modules; I've been using DBI in general for about 10 years.
The app is running on Apache2, mod_perl2, Apache::DBI.
So, Q2: Does anyone have any experience with any of the above modules which they'd be willing to share?
Thoughts or recommendations?
I see that Tim Bunce is involved with DBD::Multiplex, behind the scenes, and that that module is now on v2. Those things make me think happy thoughts about it. I don't know anything much at all about the maintenance of the other two modules (not to say that it's not great, it may be fantastic, just that I'm ill-informed on this).
Thank you, and Happy Wednesday.