Forum: Ruby on Rails Advice for quick fire DB replication with Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Yitzhak B. (Guest)
on 2009-06-07 14:19
(Received via mailing list)
We need an "out-of-the-box" sure-fire DB replication setup with
automatic failover for our Rails app. We haven't done it before. We'd
appreciate advice on what the simplest, surest, quickest method would
be (no more that one master/slave necessary, or two masters working
master/master).
Which gems? Which DB recommended?
Thanks
Roderick v. (Guest)
on 2009-06-07 16:00
Yitzhak Bar G. wrote:
> We need an "out-of-the-box" sure-fire DB replication setup with
> automatic failover for our Rails app. We haven't done it before. We'd
> appreciate advice on what the simplest, surest, quickest method would
> be (no more that one master/slave necessary, or two masters working
> master/master).

I consider MySQL the easiest for such a setup, in spite of all its
quirks. Combine it with Heartbeat or CARP and you'll have a high
availability configuration.

If you'd really like it to be out-of-the-box, I'd like to chime in with
http://en.railscluster.nl where we've got this entire setup managed and
ready to go for you.

--
Roderick van Domburg
http://www.railscluster.nl
Yitzhak B. (Guest)
on 2009-06-07 17:40
(Received via mailing list)
As nice as that sounds, it might not fly for two reasons:
1. Security: We probably won't be authorized to place the app on the
Internet. Until now, it's all privately hosted on closed connections
(perhaps if we could establish a closed connection...)
2. Latency. We're in Israel and the servers are in Europe.

Nonetheless, I'll ask my boss. Maybe...

Let's say we had to go it on our own, could you or anyone else
recommend the quicky recipe I'm seeking?

Thanks,
Yitzhak Bar G.
http://www.nite.org.il/scripts/english/default.asp
P.S. That's our public site. As per today, the actual tests are
administered off-line.

On Jun 7, 3:00 pm, Roderick van Domburg <rails-mailing-l...@andreas-
Roderick v. (Guest)
on 2009-06-07 20:03
Yitzhak Bar G. wrote:
> Let's say we had to go it on our own, could you or anyone else
> recommend the quicky recipe I'm seeking?

Doing a Google search for "mysql heartbeat" should yield some candidate
results.
Generally:

 1. Set up a master/master MySQL configuration on two nodes as usual.
Let one node use even numbers for autoincrements, the other one odd
numbers.

 2. Set up Heartbeat to float a single IP address between the two nodes.

 3. Have the Rails application connect to the floating IP address.

--
Roderick van Domburg
http://en.railscluster.nl
Yitzhak B. (Guest)
on 2009-06-07 21:10
(Received via mailing list)
Thanks

On Jun 7, 7:03 pm, Roderick van Domburg <rails-mailing-l...@andreas-
This topic is locked and can not be replied to.