Skip to main content

Version: latest

Scale Data Plane

API7 Gateway Data Plane (DP) nodes are stateless, which makes them straightforward to scale horizontally as traffic grows. Use this page when you need to add capacity to an existing deployment.

If you are planning a production deployment, read these guides together:

Horizontal Scaling

Horizontal scaling involves adding more Data Plane nodes to your deployment. This is the most common way to increase the capacity of API7 Gateway.

Stateless Design

The Data Plane nodes do not store any local state. All configurations are received from the Control Plane and held in memory. This means you can add or remove DP nodes without losing any configuration or affecting the overall system stability.

Load Balancer Configuration

A load balancer (such as NGINX, HAProxy, or a cloud provider's load balancer) is typically placed in front of the Data Plane nodes to distribute incoming traffic.

  • Health Checks: Configure the load balancer to perform regular health checks on the DP nodes (typically at port 7085, using the /status or /status/ready endpoints).
  • Load Balancing Algorithms: Use algorithms like Round Robin, Least Connections, or IP Hash, depending on your traffic patterns.

Kubernetes Horizontal Pod Autoscaling (HPA)

If you are running API7 Gateway on Kubernetes, you can use HPA to automatically scale the number of DP pods based on CPU or memory utilization.

# Example HPA configuration
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: api7ee-dp-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: api7ee-dp
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70

Manual Scaling

In non-Kubernetes environments, you can manually scale the Data Plane by starting new DP nodes and adding them to the load balancer's upstream pool.

  1. Start New DP Node: Deploy a new DP instance with the same configuration as existing nodes.
  2. Verify Connectivity: Ensure the new node can connect to the Control Plane.
  3. Add to Load Balancer: Update your load balancer configuration to include the new node's IP address.

Considerations for Scaling

When scaling the Data Plane, consider the following:

  • Control Plane Capacity: Ensure the Control Plane can handle the increased number of DP nodes connecting to it.
  • Network Bandwidth: Monitor network bandwidth to ensure it doesn't become a bottleneck as you add more nodes.
  • Upstream Performance: Scaling the gateway will likely increase the load on your upstream services. Ensure they can handle the additional traffic.

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