Data Plane High Availability
High availability (HA) for API7 Gateway Data Plane (DP) nodes keeps API traffic flowing when individual nodes fail or are restarted. Use this page when you need to design a multi-node deployment behind a load balancer.
This guide focuses on runtime availability of traffic-serving nodes. For adjacent concerns, see:
- Scale Data Plane for adding capacity.
- Autoscale Data Plane on Kubernetes for HPA-based scaling.
- Data Plane Resilience for fallback behavior during extended control plane outages.
HA Architecture
A typical HA setup for the Data Plane involves deploying multiple DP nodes across different physical servers or availability zones.
- Multi-Node Deployment: Deploying at least two DP nodes ensures that one node can take over if the other fails.
- Stateless Operation: DP nodes operate independently and do not share any state, simplifying the HA architecture.
- Control Plane Independence: DP nodes can continue to handle traffic using the cached configuration even if the Control Plane becomes temporarily unavailable.
Health Checks and Probes
Configure health checks to monitor the status of DP nodes and ensure only healthy nodes receive traffic.
Status API Endpoint
Enable the status listener to use its health endpoints. The examples use port 7085. A 200 from /status confirms the gateway process is running. Use /status/ready when routing traffic requires an available DP Manager connection and workers in sync.
Kubernetes Probes
This Kubernetes example uses sync-aware readiness. If a gateway should stay in rotation during a shared control-plane outage, use a traffic check that can succeed with cached configuration. See Configure Readiness and Liveness Probes.
# Kubernetes pod probes example
readinessProbe:
httpGet:
path: /status/ready
port: 7085
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /status
port: 7085
initialDelaySeconds: 15
periodSeconds: 20
Resilience to Control Plane Failures
API7 Gateway Data Plane nodes are designed to be resilient to Control Plane (CP) unavailability.
- Configuration Caching: When a DP node receives configuration from the CP, it caches it in memory.
- Traffic Processing: Running nodes can continue serving traffic from cached configuration. A request can still fail when it must look up a consumer or developer through the control plane and that result is not already cached.
- Automatic Reconnection: The DP node will automatically attempt to reconnect to the CP until the connection is restored. Once reconnected, it will synchronize any configuration changes made during the downtime.
Multi-Node DP Deployment
To achieve HA, you should deploy multiple DP nodes behind a load balancer.
- Load Balancer: Distributes traffic across all healthy DP nodes.
- Health Checks: Choose a check that reflects when a node should receive traffic. For a node starting from a snapshot during an outage, follow fallback recovery.
- Failover: If a DP node fails, the load balancer will stop sending traffic to it and redistribute the load to the remaining healthy nodes.