Strewth!

Insert Wit Here

Archive for March 2012

Route53 Latency Based Routing

AWS Route53 launched a new feature today, Latency Based Routing. While playing around with this I created a few bits.

First I set up a t1.micro instance running in each region which will serve you a cat picture. Using a CloudFormation template I created the EC2 instance, downloaded the content from an S3 bucket, setup Apache, created an A record for the host, and another A record encoding the region. Each instance is now directly available via http://<aws region string>.strewth.org/. Here’s the direct link to west coast cat in us-west-1.

The next step was create an LBR A record of region.strewth.org with appropriate RRs for each region. This was done via the AWS console. When entering the IP address the console automatically detected which region the EC2 instance is associated with. Slick!

And now this image comes directly from an AWS region near you:
your fastest cat

LBR isn’t limited to just A records, any record type should work. You could could send Puppet clients to their fastest Puppet Master using LBR SRV records, for example.
To troubleshoot “where am I routed to” questions I created a handy TXT record, region.strewth.org. This record simply echos back the AWS region it is associated with. For example:

# dig +short region.strewth.org txt
"us-west-1"

LBR is an awesome feature for directing end users to the fastest available dynamic content. I can’t wait to see what people use this for.

Written by donavan

2012/03/21 at 17:26

Posted in Software

Tagged with , ,