Deployment modes
Each of these deployment modes are explained in detail below.
In the traditional deployment mode, one instance of APISIX will be both the data plane and the control plane.
There will be a conf server that listens on the UNIX socket and acts as a proxy between APISIX and etcd. Both the data and the control planes connect to this conf server via HTTP.
An example configuration of the traditional deployment mode is shown below:
conf/config.yaml
- Listen on port to handle Admin API requests, controlled by
admin_listen
.
In the decoupled deployment mode the data plane and control plane instances of APISIX are deployed separately. i.e one instance of APISIX is configured to be a data plane and the other to be a control plane.
The instance of APISIX deployed as the data plane will:
- Fetch the configuration from the control plane. The default port is
9280
. - Performs a health check on all configured control plane addresses before starting the service.
- If the control plane addresses are unavailable, the startup fails and an exception is thrown.
- If all control planes are normal, APISIX service is started normally.
- Once the service is started, it will handle the user requests.
The example below shows the configuration of an APISIX instance as data plane in the decoupled mode:
conf/config.yaml
The instance of APISIX deployed as the control plane will:
- Listen on port and handle Admin API requests.
- Provide the conf server which will listen on port
9280
. Both the control plane and the data plane will connect to this via HTTPS enforced by mTLS.
conf/config.yaml
tip
As OpenResty <= 1.21.4 does not support sending mTLS requests, to accept connections from APISIX running on these OpenResty versions, you need to disable the client certificate verification in the control plane instance as shown below:
conf/config.yaml
In the standalone deployment mode, APISIX is deployed as a data plane and it reads in configurations from a YAML file (apisix.yaml
) in the local file system.
This deployment mode is useful when you have to declaratively define the configuration or when you are using a different configuration center other than etcd.
To configure APISIX in standalone mode: