High capacity configuration
This scenario discusses how to expand an existing deployment of ArcGIS Server on Amazon EC2 to be able to accommodate more end users. It builds on the Simple configuration scenario, which described configuring ArcGIS Server on Amazon EC2 for a small government Web application. Now suppose that your application is experiencing so much traffic that you want to multiply your server resources.
The strategy for scaling out your deployment is to add additional Elastic Compute Cloud (EC2) instances containing ArcGIS Server and connect them with an Amazon Elastic Load Balancer (ELB). You can optionally monitor your deployment and create and destroy instances in response to demand (also known as auto scaling). This freedom to pay for only the servers you need at any given time is one of the most attractive aspects of cloud computing.
Creating a load balancer
You can use Amazon ELBs to distribute requests to multiple machines under a common IP address. In the AWS Management Console, there's a Load Balancers link that you can use to create a load balancer and add EC2 instances to that load balancer.
- Create a load balancer by stepping through the Create Load Balancer wizard in the AWS Management Console.
- Once you've created your load balancer, copy or write down its DNS name. You can see this name if you click your load balancer in the list, then click the Description tab below.
- Add your existing production instance to the load balancer. To do this, click the name of your load balancer, click the Instances tab below, then click the +/- icon.
- Modify your Web applications to use the DNS name of the load balancer instead of the DNS name of the EC2 instance. Do this anywhere that your application accesses services from ArcGIS Server.
Creating additional EC2 instances
Any ArcGIS Server EC2 instances that you add to your deployment should be identical. This is because you want all of your servers to respond the same way when they are assigned incoming requests from the load balancer.
You can use an Amazon Machine Image (AMI) to create identical instances. You can capture your current deployment of ArcGIS Server as an AMI and use it to launch an instance on any type of machine that Amazon EC2 offers.
Follow the instructions in Creating your own ArcGIS Server AMI to make an AMI from your current production EC2 instance of ArcGIS Server. Then launch a new instance with this AMI.
If you don't want to add a full second machine, you can just use your AMI to launch an identical instance on a larger machine type. After testing your new instance, you can terminate the instance that was on the smaller machine type and not bother with configuring a load balancer. If you take this approach, configuring an elastic IP can help you ensure that the new, larger instance has the same Web address as the old instance.
Connecting your instances with an ELB and auto scaling
Once you have multiple EC2 instances containing ArcGIS Server, you can add them to your load balancer. Requests to the load balancer will be distributed to an available EC2 instance running ArcGIS Server. If a server becomes unavailable, the remaining servers will continue to receive requests. In this way, a load balancer provides high availability in addition to its ability to increase the capacity of your deployment.
Once you have a load balancer configured and a custom AMI, you can monitor your deployment and create or terminate instances in response to demand. See Adding more Amazon EC2 instances in response to demand for more information on how to get started with this process, known as auto scaling.