Skip to main content

Version: latest

Multi-Region Deployment Patterns

Deploying API7 Gateway across multiple geographic regions enables you to serve users globally with low latency and provides a robust disaster recovery solution. This page explores common multi-region deployment patterns and their configuration considerations.

Multi-Region Deployment Patterns

Choose a deployment pattern based on your availability, latency, and operational requirements.

Active-Active Deployment

In an active-active pattern, API7 Gateway is deployed and actively serves traffic in two or more regions simultaneously.

  • Global Load Balancing (GSLB): Use a GSLB service (e.g., AWS Route 53, Cloudflare) to route users to the nearest healthy region based on latency or geographic proximity.
  • Independent Control Planes: Each region typically has its own Control Plane and Data Plane cluster to minimize cross-region dependency.
  • Data Replication: Synchronize configurations across Control Planes using ADC (API Declarative CLI) or CI/CD pipelines.

Active-Passive Deployment (Disaster Recovery)

In an active-passive pattern, one region is designated as the primary region, while the other serves as a standby.

  • Failover: If the primary region fails, the GSLB service redirects all traffic to the passive standby region.
  • Standby Capacity: The standby region can be maintained at a smaller scale and scaled up during a failover event.
  • PostgreSQL Replication: Use PostgreSQL replication (e.g., logical replication or physical streaming replication) to keep the standby Control Plane's database in sync with the primary.

Considerations for Multi-Region

Deploying across regions introduces several challenges that must be addressed:

  • Data Replication: Ensure your PostgreSQL database and any persistent storage are replicated across regions with minimal lag.
  • Latency: Minimize cross-region communication between components (CP and DP) to reduce latency and improve performance.
  • Configuration Consistency: Use GitOps and ADC to ensure all regions have the same gateway configurations.
  • Network Connectivity: Establish secure and reliable networking between regions (e.g., VPC Peering, Transit Gateway, or VPN).

Implementation Steps

  1. Regional Deployment: Deploy a complete API7 Gateway stack (CP, DP, and PostgreSQL) in each target region.
  2. GSLB Configuration: Set up your global load balancer to distribute traffic across regions.
  3. Database Sync: Configure PostgreSQL replication if using an active-passive pattern or a shared data model.
  4. GitOps Pipeline: Implement a CI/CD pipeline to deploy the same ADC configurations to all regional Control Planes.

Next Steps

API7.ai Logo

The digital world is connected by APIs,
API7.ai exists to make APIs more efficient, reliable, and secure.

Sign up for API7 newsletter

Product

API7 Gateway

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2026. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the Apache Software Foundation