https://www.udemy.com/aws-certified-solutions-architect-associate/learn/v4/t/lecture/4674544?start=0
Simple
This is the default routing policy when you create a new record set. This is most commonly used when you have a single resource that performs a given function for your domain, for example, one web server that serves content for the http://www.example.com website.
- @ IN A IP.ADD.RE.S
- @ IN ALIAS domain.com
- You can use these for basic ’round robin’ by adding several IPs or several records.
Weighted
Possibly used when you’re testing a new website and you want to send a fraction of your total traffic to your development server before moving it to production. More likely when testing new hosting parameters/configurations to see how well the new configuration is able to handle the load.
Assigns a ‘weight’ such that x% of traffic goes to one host/location while y% goes to another host/location. (This is hard to test because your browser will cache the first address it gets, so repeated refreshes will continue to display content from the first location it receives!)
Note: ‘Weights’ are specified as values between 1 – 255 and not actual percentages. All weights are added up, then each value is routed based on a percentage of that value to the total.
Example:
- MyUSASite=150, MyEUSite=75, MySingaporeSite=200
- Total=425
- MyUSASite=35%, MyEUSite=18%, MySingaporeSite=47% (all values rounded)
Use Cases
Possibly used when you’re testing a new website and you want to send a fraction of your total traffic to your development server before moving it to production. More likely when testing new hosting parameters/configurations to see how well the new configuration is able to handle the load.
Latency
Latency based routing allows you to route your traffic based on the lowest network latency for your end user (ie which region will give them the fastest response time).
To use latency-based routing you create a latency resource record set for the Amazon EC2 (or ELB) resource in each region that hosts your website. When Route 53 receives a query for your site, it selects the latency resource record set for the region that gives the user the lowest latency. Route 53 then responds with the value associated with that resource record set.
Failover
Failover routing policies are used when you want to create an active/passive setup. For example you may want your primary site to be in EU-WEST-2 and your secondary DR site in AP-SOUTHEAST-2.
Route 53 will monitor the health of your primary site using a health check.
Create a health check
- Configure a Health Check
- Route 53 > Health Checks > [Create health check]
- Name: MyUsaHealthCheck
- What to monitor
- Endpoint
- Use IP address or DNS record for an ELB
- Use the AWS assigned record, not one of your own (although this probably works too! )
- Advanced configuration
- Similar to setting health checks for ELBs.
- Can set ‘String Match’ similar to StatusCake (probably AWS supported, eh?)
- Use IP address or DNS record for an ELB
- Status of other health check
- State of CloudWatch alarm
- Endpoint
- Route 53 > Health Checks > [Create health check]
Configure the DNS
- Same as the others.
- Evaluate Target Health is Required
- Associate with Health Check is Required
- Associate with the Service that is being checked and not the Website as a whole
- Attempts to associate with the website will result in an error, since it will have nothing to failover to.
Geolocation
Geolocation routing lets you choose where your traffic will be sent based on the geographic location of your users (ie the location from which DNS queries originate). For example, you might want all queries from Europe to be routed to a fleet of EC2 Instances that are specifically configured for your European customers. These servers may have the local language of your European customers and all prices are displayed in Euros.
- Geolocations may be set by continent, country, and in the USA, by state.
- A location of ‘Default’ is any location that has NOT been specifically defined (wildcard).
Exam Tips
- Elastic Load Balancers never have an IPv4 address. You should ALWAYS use the DNS name.
- This requires the use of an ALIAS record if using a ‘naked’ (no subdomain) domain name.
- Know the difference between Alias and a CNAME records
- Only an Alias can be used with a ‘naked’ domain.
- Recommend using an Alias over a CNAME in pretty much every circumstance.
- Know the differences between
- Simple
- Weighted
- Latency
- Failover (require health checks)
- Geolocation
- There is a 50 Domain default limit to the number of domains you can host with Route 53, however this number can be increased by contacting AWS support.