Origin Failover

Last update:2024-07-17 16:28:59

Enterprises often leverage multiple origin servers within their content delivery strategies to improve redundancy and ensure high availability. In the event of an origin server failure, the CDN must seamlessly switch requests to alternate healthy origins to prevent disruptions to the end-user experience.
CDNetworks provides Automatic Origin Failover and Zero-Delay switching to streamline this process, guaranteeing business continuity and seamless content access for your end users.

Automatic Origin Failover
When multiple origin server IP addresses are configured for your website, the Automatic Origin Failover feature intelligently detects if an origin server becomes unavailable due to failures or maintenance. If a designated status code is detected (e.g., 503 Service Unavailable), our CDN immediately re-routes the request to another available origin server. This rerouting process is activated by default on subsequent user requests, immediate effect can be achieved by enabling the Zero-Delay switching feature.

Zero-Delay
The Zero-Delay switching feature seamlessly and instantaneously redirects user requests to a functioning origin server in the event of a failure, eliminating any perception of delay. This ensures that user access is not interrupted by origin server downtime, thereby maintaining business continuity and preserving the quality of the user experience.

How to Configure Automatic Origin Failover

  1. Log in to the CDNetworks Console and select the appropriate product.
  2. Navigate to the Configuration, locate the domain you wish to configure,and click on Edit Configuration on the top or the Edit button to the right of the domain온라인 지원센터 변경 안내.
  3. On the Edit Configuration page, locate Back-Origin Settings > Automatic Origin Failover, then click Modify.
  4. Select On from the Automatic Origin Failover dropdown menu and specify the status codes that should trigger this feature, separated by ;, such as 502;503.

With the configuration, CDNetworks will intelligently monitor origin server responses. Should a response contain a error status code from your configured list, the system will automatically resolve an alternate origin server IP and re-initiate the request.

After you have entered the status codes, please click OK and then select Next to submit your settings. To minimize any potential disruptions to your production environment, we strongly recommend conducting a Pre-deploy test in a staging environment. This crucial step ensures that your configurations are accurate before they go live. Once you have verified the accuracy of the settings, click Deploy Now to implement them in the live environment. The configurations typically become effective within 3-5 minutes. For comprehensive guidance on pre-deployment testing and to verify the effectiveness of your configurations, please consult the tutorial Deploy the Configurations to Staging Environment for Validation.

How to Configure Zero-Delay

  1. Log in to the CDNetworks Console and select the appropriate product.
  2. Navigate to the Configuration, locate the domain you wish to configure,and click on Edit Configuration on the top or the Edit button to the right of the domain온라인 지원센터 변경 안내.
  3. On the Edit Configuration page, locate Back-Origin Settings > Zero-Delay, then click to active the feature.
  4. After activation, proceed with Next to submit your configuration. Again, we recommend Pre-Deploy your setup in a test environment to ensure its correctness before applying it to your production environment by clicking Deploy Now. For more details on pre-deployment testing, please consult the tutorial Deploy the Configurations to Staging Environment for Validation.

Best Practices

Example for Automatic Origin Failover
Suppose you have configured 3 origin server IP addresses: 1.1.1.1, 2.2.2.2, and 3.3.3.3,,intending to automatically redirect user requests to another origin server IP in case of encountering specific errors (such as 404 or 503 status codes).

Here’s how you configure it:

  1. If the initial request to origin server 1.1.1.1 returns a 503 status code, the Automatic Origin Failover feature is triggered.
  2. Our CDN then selects an untried origin server IP from the pre-configured list, for example, 2.2.2.2, for the retry.
  3. Should the newly selected origin server return a 403 status code, the CDN will return this status code directly to the user, as 403 is not included in the retry criteria.
  4. If a 503 status code is encountered again, the process proceeds with the next origin server IP, 3.3.3.3.
  5. Granting the final origin server also responds with a 503 status code and no other alternatives are available, CDN then returns a 503 status code to the user, completing the process.

Notes

  • Automatic Origin Failover activates only when a CDN edge server successfully establishes a connection with the origin server and receives a status code. If the edge server cannot connect (no status code received), it will enable the default origin timeout retry mechanism.
  • Zero-Delay switching works in conjunction with Automatic Origin Failover and requires it to be enabled first.
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!