Failover

failoverTemplate

Keeps your site available when your origin is slow or unreachable.

{
  "name": "failoverTemplate",
  "options": {
    "originRetryCount": 3,
    "originRetryInterval": "10s",
    "originMaximumReconnects": 2,
    "simulateFailover": true,
    "headerName": "breakconnection",
    "headerValue": "Your-Secret-Here",
    "isStagingOnly": true,
    "failoverActionType": "SERVE_ERROR"
  }
}

Origin health detection

Recommended. Monitors the health of your origin's IP addresses so edge servers stop retrying an
IP that's failing. Akamai preconfigures these values for Ion based on performance best practices:

OptionShips asWhat it means
originRetryCount3Consecutive failures before an IP is marked faulty.
originRetryInterval10sHow long an edge server waits before testing a faulty IP again.
originMaximumReconnects2Total attempts an edge server makes across all available origin IPs.

Simulate failover

Lets you test your failover configuration without taking your origin offline. It's preset to run on
the staging network only, and never executes in production.

OptionShips asWhy
simulateFailovertrueReady to test from the start. The three options below are only available while this is true.
isStagingOnlytrueKeep this. It's what guarantees the simulation can't fire against production traffic.
headerName"breakconnection"The request header that triggers the simulation.
headerValue"Your-Secret-Here"The value that header must carry.

When a staging request carries that header and value, Akamai applies Break Forward
Connection
, dropping
the forward connection to your origin and forcing your failover settings to trigger so you can
confirm they work.

📘

Your-Secret-Here is a placeholder

Anyone who knows the header name and value can force failover on your staging network. Replace it
with a unique, private string in your own template before testing.

Failover action

failoverActionType ships as SERVE_ERROR: when failover triggers, the edge serves an error
rather than redirecting traffic somewhere that may not be ready for it. It's a safe default that
needs no further configuration, and it's an override — the behavior's own default is REDIRECT.

The other actions each need their own options, and failoverResponseCodes becomes available for all
of them (it's unavailable under SERVE_ERROR):

ValueServesNeeds
SERVE_STALEStale cached content—
REDIRECTA redirectredirectHostnameType, redirectMethod, optionally redirectHostname, redirectCustomPath / redirectPath, modifyProtocol / protocol
ALTERNATE_HOSTNAMEContent from a backup hostnamealternateHostname, optionally alternateHostnameCustomPath / alternateHostnamePath
ALTERNATE_HOSTNAME_PROVIDERContent from an alternate provideralternateHostnameProvider, optionally its custom path options
ALTERNATE_CONTENT_NETSTORAGEA static file from NetStoragenetStorageHostname, netStoragePath, netStoragePathStatusCode, failoverCpCode