- English
- 日本語
Failover configuration
Last updated 2022-07-20
This guide describes how to configure failover origin servers. Failover (backup) servers ensure you can maintain availability of your content if your primary server is not available.
Before you begin
To configure failover origin servers you must make sure you have health checks configured for your primary server. If you configure your failover servers but don't configure health checks on the primary server, the failover won't work properly if your primary server stops responding.
Configuring a failover origin server
Once you've confirmed health checks are configured, you must:
- Enable automatic load balancing on all primary origin servers and any servers that will become your failover.
- Attach a condition to the failover server that specifies exactly when to use is as a backup.
Enable automatic load balancing
To configure a failover origin server, turn on automatic load balancing for your primary and failover origin servers by following the steps in our guide on configuring load balancing.
Specify when to use the failover server
Once you've configured your primary and failover servers, attach a condition that specifies exactly when the failover servers should be used. The settings for the condition differ depending on whether you have a single primary origin server or multiple primary origin servers.
- Log in to the Fastly web interface.
- From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
- Click Edit configuration and then select the option to clone the active version.
- Click Origins.
In the Hosts area, find your failover origin server and click Attach a condition.
Click Create a new request condition.
In the Name field, enter the name of your request condition (for example,
Primary origin down
).In the Apply if field, enter the conditions under which to use the failover server:
- If you have multiple primary servers, enter the following in the Apply if field:
backend.autodirector_.healthy == false
. - If you have a single primary server, enter the following in the Apply if field:
backend.{name of primary server}.healthy == false
.NOTE
Preview the VCL to find the name of the primary server. Typically the name is prefixed with
F_
and spaces are replaced with underscores. For example, a backend calledHost 1
has the VCL nameF_Host_1
.
- If you have multiple primary servers, enter the following in the Apply if field:
Click Save and apply.
For any other failover origin servers, click Attach a condition and select the condition you already created to apply it.
Do not use this form to send sensitive information. If you need assistance, contact support. This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.