Without failover configuration, your DNS record for "example.com" probably looks like:
Name: example.com Type: A - IPv4 address Alias: No TTL(Seconds): 300 Value: 192.168.0.1 Routing Policy: Simple
To create a automatic failover, you need to update your DNS record, also you need to create two additional record (One health check and one DNS record).
Create a health check:
1. In "Health checks" console, choose "Create health check"2. Fill in the following information
Name: example.com What to monitor: Endpoint Specify endpoint by: IP Address Protocol: HTTP IP Address: 192.168.0.1 Port: 803. Keep evreything else default unless you want to change
4. Save this new health check
Route53 will now check the health of "example.com" by periodically requesting it and verifying that it returns a successful response.
Update existing record to the following:
Name: example.com Type: A - IPv4 address Alias: No TTL(Seconds): 60 Value: 192.168.0.1 Routing Policy: Failover Failover Record Type: Primary Set ID: website-Primary Associate with Health Check: Yes Health Check to Associate: example.com
Note: TTL is set to 60 because we want shorten the cached time of the DNS record and allows quicker failovers
Create a new DNS entry:
Name: example.com Type: A - IPv4 address Aias: No TTL (Seconds): 60 Value: 192.168.0.2 Routing Policy: Failover Failover Record Type: Secondary Set ID: website-Secondary Associate with Health Check: No
Now your primary site is being health checked by Route53, and Route53 will automatically start sending traffic to backup server.
No comments:
Post a Comment