[Catalyst] DBIx::HA

Oleg Kostyuk cub.uanic at gmail.com
Sat Oct 15 12:54:03 GMT 2011

2011/10/13 clara resende <clrrsnd at gmail.com>:
> On Thu, Oct 13, 2011 at 4:31 PM, Peter Edwards <peter at dragonstaff.co.uk>
> wrote:
>> >I need to be able to failover between two database backends.
>> If you are using DBIx::Class it will reconnect stale database handles, so
>> as long as your failover uses the same DSN hostname it should just work.
> That would be nice, but unfortunately it does not work like that over here
Why? Impropely configured DNS?

> (and I cannot do anything about that).
It's not true. Even if your DNS server working not as you need - you
always can setup your own local BIND, configure it to use round-robin,
configure new zone in it, add all your database hosts under same
hostname, and everything will be fine. But I think such details are
out of scope this mailing list.

>>> The DBIx::HA seems to be the right tool to that, but how to use it with
>>> Catalyst?
>> You can use any database backend you like with Catalyst, check out the
>> Model configuration part of the Catalyst manual.
>> That particular module needs Apache::DBI so won't be compatible with
>> DBIx::Class though.
> Isn't there another way achieve this, with DBIx-Class, similar to what the
> HA module does?

May be, DBIx::Class::Storage::DBI::Replicated ?...

Sincerely yours,
Oleg Kostyuk (CUB-UANIC)

More information about the Catalyst mailing list