How to Implement Cheap DNS Load Balancing and Failover Using AWS Route 53

networking speed

Load Balancing is the idea that of splitting software or community load between two or extra servers, bearing in mind higher efficiency and longer uptime. AWS’s Load Balancers price cash to run, however you’ll reach the similar impact totally free the usage of Course 53.

How Does DNS Load Balancing Paintings?

With a typical load balancer, like AWS’s Utility Load Balancer, you direct all visitors in opposition to the weight balancer, and it handles the task of routing visitors in your cases. In reality, all AWS’s load balancers are are cases operating a carrier like HAProxy, and dealing with a top quantity of visitors.

The speculation at the back of DNS load balancing is lovely easy. Even with the common load balancer, the consumer must make a DNS look up to grasp the place to ship any requests in your web page. On the other hand, the DNS doesn’t must be static, and that’s the concept that AWS’s Course 53 DNS carrier has carried out. As soon as arrange, on every occasion Person A requests the web site, he’ll be despatched to Server 1, and when Person B requests the web site, Course 53 will ship them to Server 2 as a substitute.

User A requests site, is sent to Server 1. User B requests site, Route 53 sends to Server 2 i

This may optionally be arrange in a special development—failover. In case your software can run on a unmarried server, however you wish to have 100% uptime, Course 53 can redirect visitors to a standby example on every occasion the principle example turns into overloaded or unavailable.

If you wish to set both of those patterns up, Course 53 makes it simple. When you’re now not already the usage of Course 53 and wish to transfer, you’ll learn our information on moving your area identify to it.

Configuring Course 53

Check in to the Course 53 control console, and choose “Well being Exams” within the sidebar, and create a brand new well being test. Those might be used to direction visitors clear of dangerous cases within the scaling staff. Those price $zero.50 monthly every to run, however they’re non-compulsory.

Select "Health Checks,"  create a new health check.

Well being tests have a couple of choices, however most commonly you’re simply giving Course 53 an endpoint to observe. You’ll use IP deal with or Area identify, however for those who’re tracking the well being of a person server, you’ll wish to use the Elastic IP deal with for that server.

Configure health check

You’ll wish to repeat this procedure for your entire servers, making a well being test for every.

Click on on “Hosted Zones” within the sidebar, and convey up the hosted zone in your area. “Create” or edit a brand new A Document, and input within the IP deal with of certainly one of your servers. You’ll additionally simply use Aliases, which map dynamically to an AWS useful resource.

When you set the routing coverage to “Weighted,” you’ll assign this report a weight. Giving a weight of one to more than one A Information will make Course 53 choose between between them similarly. For “Set ID,” input in one thing distinctive that’s the similar for all data on this weighting staff.

Set the routing policy to "Weighted,"  assign this record a weight. In "Set ID," enter something unique same for all records in this weighting group.

Underneath, click on “Sure” for “Affiliate With Well being Test,” and choose the well being test for this server. If the well being test fails, this report received’t be picked.

 Click "Yes" for "Associate With Health Check," select the health check for server

Repeat this procedure for every server.

If you wish to arrange failover, as a substitute set the routing coverage to “Failover,” and choose both “Number one” or “Secondary,” relying at the server. You’ll additionally wish to hyperlink this with a well being test.

Set up failover.

Whenever you save the data, Course 53 will have to get started balancing visitors.

Leave a Reply

Your email address will not be published. Required fields are marked *