Stand-alone mode
Turning on the APISIX node in Stand-alone mode will no longer use the default etcd as the configuration center.
This method is more suitable for two types of users:
- kubernetes(k8s):Declarative API that dynamically updates the routing rules with a full yaml configuration.
- Different configuration centers: There are many implementations of the configuration center, such as Consul, etc., using the full yaml file for intermediate conversion.
The routing rules in the conf/apisix.yaml file are loaded into memory immediately after the APISIX node service starts. And every time interval (default 1 second), will try to detect whether the file content is updated, if there is an update, reload the rule.
Note: When reloading and updating routing rules, they are all hot memory updates, and there will be no replacement of working processes, it is a hot update.
To enable Stand-alone model, we can set apisix.config_center to yaml in file conf/config.yaml.
Refer to the example below:
In addition, since the current Admin API is based on the etcd configuration center solution, enable Admin API is not allowed when the Stand-alone mode is enabled.
How to configure rules#
All of the rules are stored in one file which named conf/apisix.yaml,
the APISIX will check if this file has any changed every second.
If the file changed and we found #END at the end of the file,
APISIX will load the rules in this file and update to memory of APISIX.
Here is a mini example:
NOTE: APISIX will not load the rules into memory from file conf/apisix.yaml if there is no #END at the end.
How to configure Router#
Single Router:
Multiple Router: