[Dbix-class] Replication
Jim Spath
jspath at pangeamedia.com
Wed Oct 24 19:17:18 GMT 2007
Brandon Black wrote:
> On 10/24/07, Jim Spath <jspath at pangeamedia.com> wrote:
>> What is the current state of replicated database support in DBIx::Class?
>>
>> We are considering creating a master/slave setup with our MySQL
>> database, but weren't sure if it would be easy to support it in our
>> Catalyst/DBIx::Class applications.
>>
>> From previous discussions on the list, it seems like DBD::MultiPlex is
>> out of favor?
>>
>> I searched CPAN and found DBIx::Class::Storage::DBI::Replication, which
>> utilizes DBD::Multi. It's labeled as experimental, which makes me
>> nervous about using it in a production enviroment, but it sounds like
>> exactly what I am looking for. Is it stable?
>>
>> There must be DBIx::Class users who are setup and running a replicated
>> database. What solutions have you come up with?
>>
>
> I'm not sure what the state of the explicit support is (like
> DBD::Multi/DBD::MultiPlex). I'm assuming what you want to do is send
> reads to the slave and writes to the master? If so, something of this
> nature will be required.
>
> Of course, if you don't need to send reads to the slave for
> performance reasons, you can just send everything to the master, and
> use the slave separately as your backup / data warehouse. Some people
> do failover between the two as well, with the slave being promoted to
> master on master failure. By adding a virtual floating IP (via
> "heartbeat" in the case of linux) you can again solve that problem
> with a single normal connection from DBIC. It's only the
> read-balancing (or even write-balancing in the case of multi-master)
> that needs some special support in DBIC.
The intention is to send writes to the master and reads to the slaves
for performance reasons.
DBIx::Class::Storage::DBI::Replication has this functionality, but I'm
wary of the "experimental" label.
I guess I'm mainly looking for feedback on this module from people that
have used it in production environments.
- Jim
More information about the DBIx-Class
mailing list