Server configurations

The server configurations of MOSN.

This topic describes server configurations of MOSN.

In the configuration structure of MOSN, servers indicates a server array, but only one server is supported currently.

server describes the following basic global parameters of MOSN.



The default error log path, which supports a complete log path, stdout, and stderr.

  • If this field is left empty, logs are output to stderr by default.


The default error log level. Valid values: DEBUG, INFO, WARN, ERROR, and FATAL.

  • Default value: INFO.


  • The log roller configuration, which is valid for all logs, for example, tracelog, accesslog, and defaultlog.
  • The string type, which supports two modes: rolling by time and rolling by log size. Only one mode is valid at a time.
  • Rolling by log size
    • size: The log size threshold (in MB) to start rolling.
    • age: The number of days during which the logs will be saved.
    • keep: The maximum number of logs to be saved.
    • compress: Specifies whether to compress logs. Valid values: on and off.
"global_log_roller": "size=100 age=10 keep=10 compress=off"
  • Rolling by time
    • time: The time interval (hours) for rolling.


  • The Duration String configuration. Indicates the maximum waiting time for disabling a connection in a hot upgrade of MOSN.
  • Default value: 30s.


The number of GOMAXPROCS used by MOSN.

  • Default value: the number of CPUs.
  • If it is not set or is set to 0, the default value is used.


Settings for a group of Listeners.

Router configurations

This topic describes router configurations.