nfrankel commented on code in PR #8724: URL: https://github.com/apache/apisix/pull/8724#discussion_r1095428408
########## docs/en/latest/deployment-modes.md: ########## @@ -155,15 +155,273 @@ deployment: ## Standalone -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. +Turning on the APISIX node in Stand-alone mode will no longer use the default etcd as the configuration center. -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. +This method is more suitable for two types of users: -To configure APISIX in standalone mode: +1. kubernetes(k8s):Declarative API that dynamically updates the routing rules with a full yaml configuration. +2. Different configuration centers: There are many implementations of the configuration center, such as Consul, etc., using the full yaml file for intermediate conversion. -```yaml title="conf/config.yaml" +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. Review Comment: _Note_: Reloading and updating routing rules are all hot memory updates. There is no replacement of working processes, it's a hot update. ########## docs/en/latest/deployment-modes.md: ########## @@ -155,15 +155,273 @@ deployment: ## Standalone -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. +Turning on the APISIX node in Stand-alone mode will no longer use the default etcd as the configuration center. -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. +This method is more suitable for two types of users: -To configure APISIX in standalone mode: +1. kubernetes(k8s):Declarative API that dynamically updates the routing rules with a full yaml configuration. +2. Different configuration centers: There are many implementations of the configuration center, such as Consul, etc., using the full yaml file for intermediate conversion. -```yaml title="conf/config.yaml" +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. + +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. + +The Stand-alone mode can only be enabled when set the role of APISIX as data plane. We can set `deployment.role` to `data_plane` and `deployment.role_data_plane.config_provider` to `yaml`. + +Refer to the example below: + +```yaml deployment: - role: data_plane - role_data_plane: - config_provider: yaml + role: data_plane + role_data_plane: + config_provider: yaml +``` + +### How to configure rules + +All of the rules are stored in one file which named `conf/apisix.yaml`, Review Comment: All of the rules are stored in one file named `conf/apisix.yaml`; APISIX checks if this file has any change **every second**. If the file changed and ends with `#END`, APISIX loads the rules from this file and updates its memory. ########## docs/en/latest/deployment-modes.md: ########## @@ -155,15 +155,273 @@ deployment: ## Standalone -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. +Turning on the APISIX node in Stand-alone mode will no longer use the default etcd as the configuration center. -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. +This method is more suitable for two types of users: -To configure APISIX in standalone mode: +1. kubernetes(k8s):Declarative API that dynamically updates the routing rules with a full yaml configuration. +2. Different configuration centers: There are many implementations of the configuration center, such as Consul, etc., using the full yaml file for intermediate conversion. -```yaml title="conf/config.yaml" +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. + +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. + +The Stand-alone mode can only be enabled when set the role of APISIX as data plane. We can set `deployment.role` to `data_plane` and `deployment.role_data_plane.config_provider` to `yaml`. Review Comment: Standalone mode can only be enabled when we set the role of APISIX as data plane. We set `deployment.role` to `data_plane` **and** `deployment.role_data_plane.config_provider` to `yaml`. ########## docs/en/latest/deployment-modes.md: ########## @@ -155,15 +155,273 @@ deployment: ## Standalone -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. +Turning on the APISIX node in Stand-alone mode will no longer use the default etcd as the configuration center. -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. +This method is more suitable for two types of users: -To configure APISIX in standalone mode: +1. kubernetes(k8s):Declarative API that dynamically updates the routing rules with a full yaml configuration. +2. Different configuration centers: There are many implementations of the configuration center, such as Consul, etc., using the full yaml file for intermediate conversion. -```yaml title="conf/config.yaml" +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. + +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. + +The Stand-alone mode can only be enabled when set the role of APISIX as data plane. We can set `deployment.role` to `data_plane` and `deployment.role_data_plane.config_provider` to `yaml`. + +Refer to the example below: + +```yaml deployment: - role: data_plane - role_data_plane: - config_provider: yaml + role: data_plane + role_data_plane: + config_provider: yaml +``` + +### 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: + +```yaml +routes: + - + uri: /hello + upstream: + nodes: + "127.0.0.1:1980": 1 + type: roundrobin +#END +``` + +*NOTE*: APISIX will not load the rules into memory from file `conf/apisix.yaml` if there is no `#END` at the end. Review Comment: *WARNING*: APISIX will not load the rules into memory from file `conf/apisix.yaml` if there is no `#END` at the end. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
