You can deploy APISIX in three modes:
In traditional mode, every APISIX instance runs as both a control plane and data plane. APISIX configurations are stored in etcd. The APISIX instance dynamically routes requests and responses, as well as interacts with etcd to synchronize configurations.
This example shows a sample configuration for deploying APISIX in traditional mode:
- port: 9080
Running APISIX in traditional mode is the simplest way to get APISIX started and can reduce additional configuration management and overhead. However, there are some downsides too. As the responsibilities of data plane and control plane are not separate, deploying APISIX in traditional mode may not meet the production requirements in resiliency and availability.
In decoupled mode, APISIX instances are divided into two roles: data plane and control plane. The data plane is responsible for actual data like requests and responses flowing through the system. The control plane manages and orchestrates the whole system and sets rules and policies on how the data plane handles data.
This example shows a sample configuration for deploying APISIX as a data plane in decoupled mode:
This example shows a sample configuration for deploying APISIX as a control plane in decoupled mode:
Running APISIX in decoupled mode brings some benefits:
Separation of the data plane and control plane allows both planes to operate independently without depending on one another. This independence enables the data plane to scale easily without impacting the control plane. This scalability ensures that a network architecture can seamlessly accommodate growth and increased data demands.
Since the control plane and the data plane are decoupled, a security breach in one plane cannot be exposed to the other. If a control plane is offline, data planes will run using their last configuration. Additionally, decoupling makes it easier to introduce optimized security mechanisms separately for each plane.
Both planes perform distinct functionalities independently. The separation of layers enables each plane to concentrate on optimizing its specific tasks. For instance, the control plane can prioritize efficient routing and decision-making. Meanwhile, the data plane can focus on swift and effective packet forwarding and enhancing network performance.
While decoupling control planes and data planes provides many benefits, it also introduces some challenges and drawbacks.
While the decoupled planes work independently from one another, they still need to communicate with each other to take instructions and perform their tasks. It can lead to increased latency, especially in distributed architectures, introducing delays for packet transmission through the networks.
Decoupling control planes and data planes can also increase additional configuration management and overhead. It requires significant skills and expertise to operate such two separate planes. Finding such expertise can be challenging and costly.
For details about how to get started with APISIX in decoupled mode, see Install APISIX in decoupled mode using Docker.
In standalone mode, APISIX works as the data plane and loads configurations from
apisix.yaml into memory immediately after APISIX starts.
This example shows a sample configuration for deploying APISIX in standalone mode:
The combination of standalone mode and declarative configuration has a number of benefits:
You do not need to install and manage the etcd. In this mode, all APISIX configurations are stored in-memory on the node.
Consolidate your APISIX configurations
All APISIX configurations are kept in a single source of truths to reduce the possibility of errors and even simplify configuration management.
For details about how to get started with APISIX in standalone mode, see Install APISIX in standalone mode using Docker.
For details about how to configure APISIX, see Standalone configurations.