To create a basic Rails deployment using the Rails FrontEnd server template. The tutorial will show you how to configure a 4-instance setup with two loadbalanced frontends and a redundant MySQL database backend. After you have completed this intial setup, we will show you how to customize your deployment to fit your particular needs.
NOTE: This tutorial only applies to Premium accounts. If you have a Developer account and would like to upgrade, please contact sales@rightscale.com.
In order to create a high-availbility loadbalanced webserver solution on EC2 we have created front-end server templates that run HAProxy. This is a high-reliability software load balancer that automatically checks the health of your application and decides whether to forward traffic to a particular server based on these health checks. To provide extra functionality, we also run Apache in front of HAProxy, which allows you to serve static pages locally and establish ssl connections with only a slight increase in latency. To the right is a concepetual overview of the flow of user traffic.
As you can see, user traffic comes into your application through Apache on port 80. Apache decides which pages to serve directly and which pages to forward to HAProxy (on port 85 by default). Since HAProxy has a list of application servers and is constantly performing health checks, it knows which servers are avilable to handle requests. It then proxies these requests to an appropriate server. Once an application server receives the request, it generally communicates with the backend database.
This tutorial will show you how to setup the minium deployment requirements for a high availability site. The setup consists of a redundant Master/Slave MySQL setup and a pair of loadbalanced frontends that also serve as application servers. See the diagram below for details.
Before you begin this tutorial, you should have already completed the Deployment Setup and Create a Redundant MySQL Setup tutorials.
Go to Manage -> Servers -> Deployments and click on the Production deployment.

Next, we will add two frontend application servers using the same server template.
Click the Add Server button.
If you are a premium account user, you have access to the premium server templates. Select the latest Rails FrontEnd server template from the premium list. Nickname the first server, FrontEnd-1. Use the production SSH key and Security Group that you already created. Select the Elastic IPs from the previous Create Elastic IPs (EIP) for each frontend. Click Add.

You should now have two Rails FrontEnd servers and two database servers in your Production deployment.

Click on the Inputs tab.
Although the list of inputs are listed alphabetically, it will be easier to understand how to properly set each input if we describe them together in their various groups. In the next step we will describe each input and how to properly set the parameters.
Click Edit. Use the links to the Inputs reference page to complete each section of input parameters. The suggested values will be highlighted in yellow.Now that you've defined all of the required input parameters, you are now ready to launch the server.
----------------------
Did you find this document helpful? Please feel free to leave us a comment below. We're always looking for ways to improve our documentation. Thanks!
As I understand it, you will use the DNS IDs that were created when you set up the DNSMadeEasy account (from the two records named fe1). edited 00:04, 1 May 2008