HAProxy Enterprise Documentation 2.1r1
Load Shedding with NS1
When you run HAProxy Enterprise in more than one availability zone, you may direct traffic to the geographically closest load balancer instance. For example, you may use Anycast network routing to send clients to the nearest instance to them. But where should a client be sent when the closest load balancer is experiencing high latency or is down?
Load shedding is a mechanism that allows you to send clients to a more distant load balancer if the closest one is too busy. Here you will learn how to configure load shedding at the DNS layer. You will use the NS1 DNS service to monitor your load balancers and shed load to an alternate load balancer when the closest instance becomes too busy or is down.
Prerequisites
An NS1 account from https://ns1.com/
A domain name to add DNS records for
Two or more geographically dispersed instances of HAProxy Enterprise
Associate DNS answers with data feeds
Add metadata to associate your A record answers with the data feeds.
In the NS1 Customer Portal, edit the A records for the zone.
Click Edit Answer Metadata for each answer and select Active connections.
Click the "Feed"
button to toggle the source of the data to become a feed.
-
Choose the appropriate data feed for the current answer.
-
Add record metadata that applies to all answers:
Specify a Low watermark that sets the threshold for when NS1 can begin shedding traffic away from a load balancer.
Specify a High watermark that sets the threshold for when NS1 must completely stop sending traffic to a load balancer.
Next up
Active/Standby Clustering