AWS Webcast - High Availability with Route 53 DNS Failover

Post on 15-Jan-2015

5,772 views 1 download

Tags:

description

This webinar will be discussing how to use DNS Failover to a range of high-availability architectures, from a simple backup website to advanced multi-region architectures.

transcript

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

High Availability with Route 53 DNS Failover

Sean Meckley, Product Manager, Amazon Route 53

Paul Kearney, Chief Software Architect, InfoSpace

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Agenda

About Route 53

What is DNS Failover?

Architectures enabled

Types of endpoints and how to get failover for each

How do I see health status?

Customer example: multi-region failover scenario

Q&A

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

What is Route 53?

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

What is Route 53?

AWS’s authoritative Domain Name

(DNS) service

Highly available and scalable

Offers tools that provide flexible,

high-performance, and highly

available architectures on AWS

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

How it Works

5

Users DNS Resolver Route 53

Where is

www.example.com? I don’t know – I’ll

ask the authority

192.0.2.1 192.0.2.1

53

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

What is DNS Failover?

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

What is DNS Failover?

Failover

Only return answers for resources

that are healthy and reachable

from the outside world, so that

your end users are routed away

from a failed or unhealthy part of

your application

Health checks

Automated requests sent over

the Internet to your application

to verify that your application is

reachable, available, and

functional

+

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

• Improve availability of your applications running on AWS

• So that you can configure backup and failover scenarios for

your own applications

• Enable highly available multi-region architectures on AWS

• Providing a means to fail over across AWS regions

Why DNS Failover?

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Endpoint: an Internet location, defined as an IP address, URL, or ELB name,

that is checked periodically to determine whether a healthy response is

returned.

• This represents an ELB, and EC2 instance, or an arbitrary IP address

Health Check: This is what your create in the Route 53 console or API.

• Has a status of either healthy or unhealthy, depending on the results of

our probing the endpoint

• You can associate one or more DNS records with the health check

DNS Failover: A Glossary

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

• Route 53 conducts health checks from within each AWS region

• To perform a health check, Route 53 makes a request to the your specified IP

address / URL. If we get a successful response, the health check passes. If

not, the health check fails.

• If a health check fails, all DNS records that are dependent on the health check

will be made inactive; DNS records that have been configured as backups will

become active

• Total time from endpoint failure to DNS failover is about 3 minutes

How Does it Work?

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Architectures Enabled by DNS Failover

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Two Basic Use Cases for DNS Failover

• Active / Active

• Latency Based Routing (LBR)

or Weighted Round Robin

(WRR)

• Stop routing to a region if it is

unavailable, for example:

• Large-scale networking issue

or AWS region outage

• Your application is down in a

particular region

• Simple Failover (Active / Standby)

• Primary site + backup site

• Lets you run both a primary and

backup site and automatically

failover to the backup site in the

event that the primary site goes

down

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Primary

(Active) Amazon Route 53

Data Volume

Database

Server

EC2 Web

App Server

AWS Region

Health Check

= Healthy

Secondary

(inactive)

Simple Failover Use Case

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Primary

(Inactive) Amazon Route 53

Data Volume

Database

Server

EC2 Web

App Server

AWS Region

Health Check

= Unhealthy

Secondary

(Active)

Simple Failover Use Case

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

LBR (Active) Amazon

Route 53

AWS Region 1

Elastic Load

Balancer

Data

Volume

Database

Server

Web App

Server

AWS Region

Health Check

= Healthy

AWS Region 2

Elastic Load

Balancer

Data

Volume

Database

Server

Web App

Server

AWS Region

Health Check

= Healthy

LBR (Active)

Multi-Region Failover

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

LBR (Active) Amazon

Route 53

AWS Region 1

Elastic Load

Balancer

Data

Volume

Database

Server

Web App

Server

AWS Region

Health Check

= Healthy

AWS Region 2

Elastic Load

Balancer

Data

Volume

Database

Server

Web App

Server

AWS Region

Health Check

= Unhealthy

Route 53 Stops Routing to

This Region

LBR (Inactive)

Multi-Region Failover

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Types of Endpoints and How to Get Failover for

Each

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Configuring DNS Failover for Elastic Load

Balancing Endpoints

DNS Failover for ELB

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Go to Hosted Zones >> Record Sets

DNS Failover for ELB

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

DNS Failover for ELB

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

• For records pointing to an EC2 instance:

• Create a Health Check in the Route 53 console or using the

API

• Associate one or more Route 53 resource record set (RRset)

with the health check

EC2 Instances as Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

• For records pointing to a non-AWS resource:

• The endpoint must have a fixed IP address

• Create a Health Check in the Route 53 console or using the

API

• Associate one or more Route 53 resource record set (RRset)

with the health check

Non-AWS Resources as Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Configuring DNS Failover for All Other

Endpoints (EC2 and Arbitrary IPs)

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Step 1: Create a Health Check

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Step 2: Associate the Health Check with a

Resource Record Set

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Go to Hosted Zones >> Record Sets

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

DNS Failover for EC2 and Other Endpoints

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

How Do I See Health Status?

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Like all metrics stored in CloudWatch, you can view them from the AWS

Management Console, set alarms, and fire notifications.

Navigate to the Route 53 console and click “Health Checks” in the left hand

nav to view your health checks. Click “View Graph”.

Monitoring Health Check Status

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

This takes you to the CloudWatch console. Note that for newly created health

checks, it takes about five minutes for metrics to start appearing in

CloudWatch.

Monitoring Health Check Status

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

From here, you can

create an alarm just

like for any other

CloudWatch metric,

and you can use the

alarm to trigger SNS

notifications (for

example, to send an

email to yourself) if

your endpoint goes

down.

Monitoring Health Check Status

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Customer Example: Multi-Region Failover

Scenario

AWS & InfoSpace Route 53 DNS Failover

InfoSpace Overview

Since 1996, our mission has been to make it fast and easy for users to

find what they need online.

Paul Kearney, Chief Software Architect

http://tech.infospace.com

InfoSpace Search

Search API Search Sites

Types of Users

• 6.5 billion clicks/month

• Broad geographical

distribution

• 150+ partners worldwide

• Located primarily in US, EU

• 2 billion queries/month

Search API Partners

Click Users

• 400 million queries per

month

• Broad geographical

distribution

Search Site Users

Global Distribution of Traffic

AZ

AZ AZ AZ

AZ AZ AZ

AZ AZ

Setup LBR – xml request

Setup LBR – dnscurl

Test 1 – Simple script

Test 2 – Fire and Forget

Production System under test

Async

Test 2 – Fire and Forget

LBR

LBR

Results

• Regional failover in 150 seconds consistently

• Decreased latency – 25% less latent worldwide

• Replaced expensive network gear from datacenter

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Q & A

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Thank You!