Failing with CloudFront Origin Groups

Improving availability with CloudFront origin failover using Terraform

Gurarpit Singh
Mar 20 · 4 min read

Origin Groups

Simply put, if CloudFront receives an error response from a primary origin, it tries the same request to a failover origin.

Setting up origin groups in the AWS console

Rollout of a new service using CloudFront origin failover and Terraform

We have recently been building a new service to replace a legacy service. The service surfaces data to the frontend. Data such as the splash background image, titles, team images and other metadata.

Replacing a service that provides the frontend with content data
New service rollout with legacy service as failover using CloudFront Origin Groups

A note on monitoring failover

Currently, there isn’t an on out of the box way to track the percentage of primary origin request failures. Metrics like TotalErrorRate report after taking into account the responses of failover origins. This means that a failover success response is not counted towards the TotalErrorRate.

Final Thoughts

CloudFront origin failover is a new feature launched recently at re:Invent 2018 a few months ago. We welcome the optimisation of high availability for CloudFront.

DAZN Engineering

Revolutionising the sport industry

Thanks to Domas Lasauskas and Yan Cui.

Gurarpit Singh

Written by

DAZN Engineering

Revolutionising the sport industry