To switch running front-end servers using dynamic assigned IPs to using Elastic IPs.
If you have running frontend servers that are using a DNS Provider for configuring their dynamic IP addresses and wish to switch to using an Elastic IP instead, you will need to follow the migration instructions below in order to ensure that your visitors do not experience any problems connecting to your site. If you do not take the necessary steps when changing the IP addresses of running frontend servers, your users could experience a sudden interruption of service and bad server requests as you suddenly switch to using Elastic IP addresses.
In order to follow best practices when switching to Elastic IP addresses you must follow the necessary precautionary steps.
Below are diagrams of two common setups. The Basic Setup is a 4-instance deployment where the frontends serve as both the load balancer and application server. In the Advanced Setup, the frontends are strictly load balancers that point to all of the application servers.
If you have not reserved Elastic IP (EIP) addresses that you can later assign to your frontend servers, follow the Create Elastic IPs (EIP) tutorial and register two Elastic IPs. You will need an EIP for each frontend server.
Select the appropriate RightScale frontend ServerTemplate (PHP FrontEnd, Rails FrontEnd, etc.).
The next step it to connect the new EIP frontend servers to the running application servers by executing the LB get HA proxy config operational RightScript. The new frontend servers will try to get the configuration file from the running frontend servers. Once they get the configuration file, they can route traffic to the application servers.
NOTE: This step only applies to the Basic Setup. For Advanced Setups, skip to the next step.
Since the frontend instances are also running the application servers, you'll need to associate the new frontends together by running the LB mongrels to HA proxy connect RightScript.
The new EIP frontend servers are now ready to serve traffic. With your DNS provider, lower the TTL on the A records that point to your frontend servers so that the change will be propagated more quickly. Wait a couple of minutes and then change the DNS A records to point to the new EIP frontend servers so incoming traffic will be routed to the frontends.
Once no more requests are being handled by the old frontend servers (FE-1, FE-2), you can safely terminate the instances. You can find information about HAproxy and Apache activity in the monitoring graphs. We recommend leaving the old frontend servers running for a couple of days to make sure everything is running properly, because if you experience any problems, it will be easy to switch back to the old frontends.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.