# Optimizing high availability with CloudFront origin failover

* You can **set up CloudFront with origin failover for scenarios that require high availability**.<br>

* To get started, you **create an origin group with two origins: a primary and a secondary**.<br>

* **If the primary origin is unavailable, or returns specific HTTP response status codes that indicate a failure, CloudFront automatically switches to the secondary origin**.

* To set up origin failover, you **must have a distribution with at least two origins**.<br>

* You **create or update a cache behaviour to use the origin group**.
