Cloud Testing - Using Different Regions and Availability Zones
In this article, we will explain when to use several different regions and availability zones in an automated test environment in Amazon Elastic Compute Cloud.
For related technical articles on cloud testing, please see the Other Articles About Cloud Testing section.
Cloud Testing - Regions and Availability Zones
Amazon data centers are located in multiple different geographic regions. Each region contains a set of Amazon EC2 service’s resources to be used: instances, AMIs, security groups, key pairs, and others.
Using the AWS Management Console, you can manage resources of the Amazon EC2 service in any region. Let’s open the AWS Management Console and see how to switch between different regions and view the resources being used. Go to the Amazon EC2 service’s http://aws.amazon.com/ec2 page and click Sign Up For Amazon EC2:
Figure 1. The Amazon EC2 service’s web page
Specify your e-mail and password. After logging in to Amazon EC2, click the AWS Management Console link. The following web page will be opened:
Figure 2. The list of the US East region’s resources displayed in the AWS Management Console
To see what resources are being used in a region, select the target region in the Navigation panel’s Region field and switch to the Amazon EC2 Console Dashboard page (if another page is currently displayed on the screen). To do this, select EC2 Dashboard in the Navigation panel. Those resources which are being used will be displayed in the My Resources group as shown in the image above.
Important: resources of one region cannot be used in another one, except for communication between instances using external addresses (we will discuss this in the ensuing articles). Nonetheless, there are some mechanisms of resource copying. For example, you can copy a prepared AMI from one region to another using AWS Command Line Tools.
The list of available regions is shown in the following image:
Figure 3. Regions where Amazon data centers are located
Each region holds several availability zones – these are data centers interconnected with a high-speed network and constructed so that service malfunctions from one availability zone don’t interfere with the work of services from another availability zone.
All instances launched in one region are inside one LAN of the cloud. Communications among instances of different regions are performed via the Internet by using their external addresses. The general scheme of Amazon’s cloud is depicted in the following image:
Figure 4. The general scheme of Amazon’s cloud
Cloud Testing - When to Use Different Regions and Availability Zones
Provision of several regions and availability zones provides the following abilities:
- You can work with instances in a region that is geographically closer to you. In this case, the data exchange rate between your computers and those in the cloud is higher.
- You can use instances located in different geographical regions. For example, this will help you perform more realistic load tests.
- If services of one of the regions or availability zones are not available for a period of time (although, this is a low-probability situation), you may use similar services from other regions or availability zones. For example, if you need 10 computers in one availability zone to perform a distributed test, and services of the availability zone you usually use are unavailable, you can launch distributed test instances in another availability zone when Cloud Testing.
The use of several regions and availability zones also has some drawbacks:
- The data transfer rate between instances of different regions is lower than that between instances of one region.
- Transferring data between instances inside one availability zone using internal IPs and private DNS names is free of charge. However, if data is transferred between different availability zones in one region or inside one availability zone, and external IPs, public DNS names or elastic IPs (elastic IPs were discussed in this Cloud Testing article) are used, the data transfer cost is 0.01$ per 1 Gb (as of January, 2014). In case of transferring data between instances of different regions, this will be billed as external Internet traffic. More detailed information on the Amazon EC2 resource pricing can be found on the http://aws.amazon.com/ec2/pricing page.
Now, it’s worth using different regions and availability zones in your Cloud Testing environment in the following cases:
- If you need test instances in different geographic regions – in this case, you will need to use different regions.
- If you need high fault-tolerance for some test instances or for all of them – you can use different availability zones to be able to use services of one availability zone if similar services are not available in another availability zone.
Also, note that if you need to transfer large amounts of data between test instances from different availability zones quite frequently, you will need to calculate the cost of the data transfers and to decide whether you want to spend the money for Cloud Testing.
In this article, we explained regions and availability zones of Amazon’s cloud and made some conclusions regarding when to use different regions and availability zones in your Cloud Testing environment. We hope that this information will help you create an effective, geographically distributed and robust Cloud Testing environment.
Other Articles About Cloud Testing