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 van Domburg
2009-Jun-07 12:00 UTC
Re: Advice for quick fire DB replication with Rails
Yitzhak Bar Geva 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 -- Posted via http://www.ruby-forum.com/.
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 Geva 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- s.net> wrote:> Yitzhak Bar Geva 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 withhttp://en.railscluster.nlwhere we''ve got this entire setup managed and > ready to go for you. > > -- > Roderick van Domburghttp://www.railscluster.nl > > -- > Posted viahttp://www.ruby-forum.com/.
Roderick van Domburg
2009-Jun-07 16:03 UTC
Re: Advice for quick fire DB replication with Rails
Yitzhak Bar Geva 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 -- Posted via http://www.ruby-forum.com/.
Thanks On Jun 7, 7:03 pm, Roderick van Domburg <rails-mailing-l...@andreas- s.net> wrote:> Yitzhak Bar Geva 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 Domburghttp://en.railscluster.nl > -- > Posted viahttp://www.ruby-forum.com/.