Origin with Failover
  • 10 Dec 2024
  • 2 Minutes to read
  • PDF

Origin with Failover

  • PDF

Article summary

Origin with Failover

To configure an origin with failover, you create a list of at least two origin hosts and define the failover conditions. 

During production, the CDN tries to connect to the primary origin (the first host in the list). When a failover condition is met, the CDN tries to connect to the next origin host in the list. If it cannot connect to any of the origins, it returns an error code.

Configure

To configure a Failover Origin:

  1. Navigate to the Add or Edit Origin dialog as described in Configure a Host or Path Origin.

  2. In the Add or Edit Origin dialog, select Origin With Failover.

  3. Select a protocol.

  4. Optionally, to override the host header value in requests to the origin, in the Origin Host Header Override field enter the replacement header value.

    Note: When you override the host header for a site that uses the HTTPS protocol, you override both the header and the SNI value. 

  5. Optionally, use the Failover Errors field to specify the error codes that will cause the CDN to switch to the failover origin. Enter multiple error codes, separated by commas and press Enter.
    Only the error codes specified here trigger failover action. If a failover origin is unavailable, the error is sent to the client. Likewise, an error code not specified by the failover conditions is sent to the client with no failover action. This is a global setting that applies to all of the origins.

  6.  Optionally, select an Origin Authentication method, and enter the relevant details. This is a global setting that applies to all of the origins.
    To configure an Amazon S3 bucket as an origin, see Configure an S3 Origin.

  7.  Add the origin hosts.

    1. Origin Hostname(s) - Enter the origin hostnames separated by commas and press Enter.
      The Connect Timeout and Read Timeout conditions are customizable for each host. While you can add all origin hosts at once, if you want to set custom failover conditions for certain hosts, you'll have to add them individually or in batches based on shared failover conditions.

    2. Connect Timeout (ms) - Optionally, set the connection timeout duration, in milliseconds. If the CDN cannot connect with the primary origin in the specified number of milliseconds, it switches to the failover origin.

    3. Read Timeout (ms) -  Optionally, set the read timeout duration, in milliseconds. If content acquisition from the origin is not complete within the specified number of milliseconds, the CDN switches to the failover origin.

    4.  Origin Retries - Optionally, use this field to define the number of retries permitted if the initial connect or read attempt fails. The default retry value is zero.

    5. Select Add Origins. The new hosts appear in the Origins List.


    6. Repeat as necessary, to add more origin hosts to the list, possibly with different Timeout and Origin Retry settings.

    7. To reorder the hosts in the Origins List, click and hold the host's number and drag it to the new location in the list.

  8. Save your changes. The origins appear in the Origins tab.


Edit

  • To edit the origin configuration, or to add an origin host, select the Pencil icon or Edit Origin.

  • To edit or delete an origin host, select the More icon   and then select Edit or Delete.

Delete

To delete the entire origin configuration, delete all the origin hosts.



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.