A key feature of Application Load Balancer is automatic failover. Failover helps maintain system availability by redirecting requests when an origin is no longer operational. For example, if an origin within your load balancing configuration is down, Application Load Balancer redirects requests to another origin within the configuration.
For Application Load Balancer, failover protection occurs at layer 3 (network) and layer 7 (application) of the Open Systems Interconnection (OSI) model.
For the network layer, which includes DNS failover and load balancing, the Cloudlet uses Akamai's Global Traffic Management (GTM) infrastructure. When a liveness test shows an origin is down, Application Load Balancer excludes that origin's IP address from responses to DNS requests.
There can be some lag time before network layer failover takes effect. To help prevent data loss due to delays in network layer failover, Application Load Balancer also uses application layer failover.
The Application Load Balancer Cloudlet behavior in Property Manager contains the application layer failover settings. You can either choose the origins to failover to, or have the Cloudlet decide.
Application layer failover occurs when a request times out, or returns an HTTP status code defined in the behavior to indicate failure.
By default, the Application Load Balancer Cloudlet behavior includes error codes from 500-509. You can add or remove HTTP error codes from the behavior.
When setting up failover for Application Load Balancer, keep the following in mind:
You can let the Cloudlet decide. If you want Application Load Balancer to choose which backup origin to use, select Automatic in the Instant Failover field.
When an origin goes down, Application Load Balancer fails over to an origin in the load balancing configuration that's available. The Cloudlet tries all origins in the configuration until the request is successful or all origins fail.
You can choose the order. If you want to specify the origins to failover to and the failover order, select Custom in the Instant Failover field. You then need to enter:
- the ID of the origin to back up, which is called the primary origin.
- the IDs of each alternate origin you want to include in the failover chain.
For custom failover, the order in which you add the alternate origin IDs is important. If the primary origin goes down, Application Load Balancer will try failing over to the first backup origin listed in the Alternate Origin IDs field. If that origin is also unavailable, the Cloudlet will try failing over to the next origin listed until one is available that can handle the traffic.
No origins available. If no origins are available for either method, the static maintenance page specified in the behavior displays.
Updated about 2 years ago