Topic: Best server solution for Rails application

I'm supposed to figure out the best HA / Load balancing solution for Ruby on Rails application.
The site that it will host serves a lot of dynamic content in Rails over a secure connection.

I have one IP address, and I am thinking that an nginx frontend with heartbeat running will host on two machines to provide High availability, and have several more real servers running Thin or mongrel as upstream to nginx on virtual machines. I've also read a little bit into LVS software like UltraMonkey, but I'm uncertain if this is overkill with nginx running as frontend server with heartbeat.

I was wondering if anyone here had any experience with HA / load balancing solutions for Rails. What's the best combination that will make full use of the hardware?

Re: Best server solution for Rails application

Upto my knowledge nginix + mongrel is the best.

Re: Best server solution for Rails application

So you'll have two nodes as load balancers (LBs) running Heartbeat. But Heartbeat won't work with virtual machines. That's unless you hack the VMs beyond recognition :) It uses ARP (Layer 2) for the VIP takover should one of the LBs fail. Behind the LBs is your mongrel servers. Those can definitely be VMs. Your Heartbeat setup is going to be expensive because you have two hardware nodes (with hearbeat) doing nothing but pointing to your mongrel VM nodes.

Here's a cheaper but somewhat hackish setup. I recommend getting two physical servers, install Xen or OpenVZ on them. Use the two CT0s or Dom0s as the LBs and create VMs to run the mongrels. The good news is that the dom0/CT0 are arp-aware. If you need more mongrels just buy more servers and add them to the LB farm.

You're in uncharted territory though so some testing / experimenting is needed.


FULLY managed everything because we care.
Dedicated Servers at UNIXy -
Virtual Private Servers at VPSLux - Feel free to get in touch. I unsubscribe from threads overnight.