Failover routing enables you to route traffic to a resource when it is healthy or to an alternative resource when the primary resource becomes unhealthy. Primary and secondary records can route traffic to anything from an Amazon S3 bucket configured as a website to a complex hierarchy of records.
In this setup, I deployed two instances across different Availability zones, also configured my domain so that if the website in the primary availability zone became unavailable, amazon Route 53 automatically redirects traffic to the instance in the secondary availability zone. Configured Route 53 health check that sends email alerts when the health of an HTTP endpoint becomes unhealthy. Route 53 periodically checks the site’s health by requesting the domain name and confirming a successful response.
Steps I Took to Set This Up:
- Created a Route 53 health check to monitor the primary endpoint.
- Configured AWS SNS notifications to get real-time email alerts.
- Set up Route 53 DNS records to enable automated failover.
- Created an A record for the secondary instance
Client: React, TailwindCSS
Clone the project
git clone https://github.com/zablon-oigo/aws-route53-failover-routing.git
Go to the project directory
cd aws-route53-failover-routing
Install dependencies
npm install
Start the server
npm run dev