# Configure Multi-Region Deployment in WAF SaaS

WAF SaaS allows you to protect the same domain from up to two regions, improving availability and resiliency.

The way traffic is handled depends on the configuration type:

* **Standard configuration** → Active-Passive
* **Special configuration** → Active-Active

### When to Use Multi-Region Deployment

Use multi-region deployment when you want to:

* Improve service availability
* Add redundancy in case of regional failure
* Reduce downtime impact

### Configuration Types

#### Active-Passive (Standard Multi-Region Configuration)

In a standard setup, traffic is handled in an **Active-Passive** model.

**How it works**

* The **first region** configured becomes the **primary region**
* The **second region** becomes the **secondary (passive) region**

**Traffic Behavior**

* All incoming traffic is routed to the **primary region**
* The **secondary region is only used during failure scenarios**

**Failover Conditions**

Traffic is redirected to the secondary region if the primary region:

* Is unreachable
* Does not respond within the expected time
* Returns specific server-side errors

**Recovery Behavior**

* Once the primary region becomes healthy again, traffic automatically returns to it
* The secondary region goes back to passive standby mode

#### Active-Active (Special Configuration)

Some configurations use an **Active-Active** model, where both regions actively handle traffic.

**Applies to**

* Protecting a **root (apex) domain**
* Using **custom ports**
* Protecting a domain with an **existing CDN distribution (e.g., CloudFront)**

**Traffic Behavior**

* Both regions are **active simultaneously**
* Traffic is routed via the platform’s global network to a **healthy region**
* Requests are typically sent to the **closest available region**
* Traffic may be distributed across both regions at the same time

**Failover Behavior**

* If one region becomes unavailable, traffic is automatically routed to the **remaining healthy region**
* No manual intervention is required
