Configuration overview
The MOSN configuration file comprises the following four parts:
- Server configurations: Currently, only one server can be configured. The server supports some basic configurations and corresponding listener configurations.
- configurations: This part supports configuring detailed upstream information of MOSN.
- xDS configurations for connecting to the control plane (Pilot)
- Other configurations
- Configurations for Trace, Metrics, Debug, and Admin API
- Extension configurations: the custom extension configurations
Configuration file overview
The basic configurations of MOSN are shown as follows.
MOSN supports the following configuration modes:
- Dynamic configuration
- Hybrid configuration
- In the static configuration mode, MOSN starts without connecting to Pilot of the control plane. This mode applies to some relatively fixed and simple scenarios (for example, demonstration of MOSN).
- Even if MOSN starts in the static configuration mode, you can use the extension code to call the dynamic configuration update API to dynamically modify the configuration.
- To start MOSN in the static configuration mode, one server and at least one cluster are required.
Dynamic configuration
After starting in dynamic configuration mode, MOSN will request the control plane to provide configurations required for running. The control plane can also push configuration updates when MOSN is running.
To start MOSN in the dynamic configuration mode, the and configurations are required.
Hybrid configuration
MOSN can start in a hybrid mode with both static and dynamic configurations. In this mode, MOSN first completes initialization in the static configuration mode and then obtains configuration updates from the control plane.
Configuration examples
The example of static configuration is as follows.
Dynamic configuration example
Listener configurations
The listener configurations of MOSN.
The server configurations of MOSN.
The trace configurations of MOSN.
The custom configurations of MOSN.