Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the failover in CloudFront High availability?

Shulou Source: shulou.com Published: 2022-05-31 14:15:39 09月19日 Update

It is believed that many inexperienced people don't know what to do about the failover in CloudFront high availability. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

In the case where we use CloudFront, multiple origin servers are generally configured to ensure the high availability of CloudFront. When one of the origin servers fails, the origin-pull server needs to be switched to the normal origin server so that the business will not be affected. In fact, on November 20th, 2018, CloudFront launched a feature for source failover, which allows the origin server to fail over without the help of other systems.

With CloudFront's source failover feature, you can set up two sources for your allocation-the primary source and the secondary source. In this way, when CloudFront detects that your primary source is unavailable, your content will be provided from your auxiliary source. This is achieved by creating a / source group / in CloudFront, where you will specify the primary source for CloudFront and the secondary source that CloudFront will automatically switch to when the primary source returns a specific HTTP status code failure response.

The two sources in the source group can be any combination of the following sources: AWS sources, such as Amazon S3 buckets or Amazon EC2 instances, or custom sources, such as your own HTTP Web server. When you create a source group, configure CloudFront to fail over to the secondary source of the GET, HEAD, and OPTIONS HTTP methods when the primary source returns a specific status code that you configured.

CloudFront routes all incoming requests to the primary source, and CloudFront sends requests to the secondary source only if the status code configured for failover or timeout is returned when attempting to route to the primary source.

To implement the source failover feature, it is very simple to create a source group. In CloudFront allocation:

Create a source group

Add primary / backup source

Select failover condition

It's done, as shown in the picture:

After reading the above, have you mastered the method of failover in CloudFront High availability? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Failure configuration code content function method state two more routing problem assignment switching assistance helpless for this business reason multiple instance Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Huawei Apple NVidia Shulou Technology