We already created a EC2 server setup and configured and uses simple routing policy. We deleted the A record that specified simple routing. We will create one with weighted policy now. In this policy, requests for your domain that come to Route 53 will be forwarded to different regions or even different ELBs based on weight specified.
Steps:
-
Go back to Route 53 and inside the hosted zone for our domain. Click on the domain to see current records. NS and SOA records should be already created as default.
-
Click on create record set.
-
Leave the name as blank to denote naked domain name.
-
Select the record type as A – Ipv4 Address
-
Click yes for Alias (as we are configuring for a naked domain name).
-
Click inside Alias target and select the ELB that is in the closer region. Remember that we have two ELBs, one in closer region and one in faster region.
-
Select the routing policy as Weighted.
-
Set the weight as 75 and give a name to denote it is pointing to the ELB in our closer region.
-
Hit Create. Now since there is only one weighted policy that sums to 75, all traffic will go to same region.
-
Create another weighted policy for the ELB that is in far region and give a weight of 25. Try refreshing the domain in a browser to see the distribution. Because of local caching by ISPs you might not see the exact distribution as you might expect in your local testing. But amazon will take care of the percentage globally.
-
Delete the A records that we just created. You do not have to cleanup everything yet, as we will be doing further labs in continuation.
Exam Tips
-
Weights in weighted policy can be any numbers (1 and 2, or 75 and 25 etc.). It is the sum and percentage of each in that sum that matters.
- heartin's blog
- Log in or register to post comments
Recent comments