connection_manager

The connection_manager configurations in Network Filter.

connection_manager specifies the router configurations of MOSN and is usually used with proxy.

  1. {
  2. "router_config_name":"",
  3. "virtual_hosts": [
  4. ]
  5. }
  • router_config_name: The unique router configuration ID, which corresponds to the field configured in proxy.
  • virtual_hosts: specifies the specific routing rules.

VirtualHost

  1. {
  2. "name":"",
  3. "domains":[],
  4. "routers":[]
  5. }
  • name: String. The unique ID of a virtual host.
  • domains: String array. Indicates a group of domains that match the virtual host. Wildcard characters are supported. The matching priorities of domains are as follows:
    • First, exact match, for example, www.foo.com.
    • Second, wildcard match with the longest suffix. For example, *-bar.foo.com is a preferred match for the domain foo-bar.foo.com between *.foo.com and *-bar.foo.com.
    • At last, wildcard match for any domains, that is, *.
  • routers: A group of specific router rules.

Router

  1. {
  2. "match":{},
  3. "route":{},
  4. "per_filter_config":{}
  5. }
  • match: The router match parameter.
  • route: The routing behavior. Specifies the upstream information of a request to be routed.
  • per_filter_config: The filter configuration in the key: json format.
    • The key needs to match the type of a stream filter, and the json corresponding to the key is the the value configured for the stream filter.
    • When this field is configured, the configurations indicated by this field can be used to overwrite the original configurations of some stream filters (depending on specific filters), to generate stream filter configurations at the router match level.

match

  1. {
  2. "prefix":"",
  3. "path":"",
  4. "regex":"",
  5. "headers": []
  6. }
  • Path match
    • prefix: Indicates that the router will match the path prefix. This configuration has a higher priority than path and regex. If this field is configured, the path prefix of the request needs to first comply with this configuration.
    • path: Indicates that the router will perform exact match the path. This configuration has a higher priority than regex. If this field is configured, the path of the request needs to first comply with this configuration.
    • regex: Indicates that the router will match the path based on a regular expression. If this field is configured, the path of the request needs to first comply with this configuration.
    • When multiple path match configurations are available, only the one with a higher priority takes effect.
  • Header match
    • headers: The group of headers that the request needs to match. The match succeeds only when the request meets all header configuration conditions.

header

  1. {
  2. "name":"",
  3. "value":"",
  4. "regex":""
  5. }
  • name: The key of the header.
  • value: The value of the header key.
  • regex: Boolean. Specifies whether the value can be matched by a regular expression. Default values: True and False.

route

  1. {
  2. "cluster_name":"",
  3. "metadata_match":"",
  4. "timeout":"",
  5. "retry_policy":{}
  6. }
  • cluster_name: The upstream cluster to which the request is to be routed.
  • metadata_match: The metadata configuration. If this field is configured, the router will match the subset of the upstream cluster based on the metadata.
  • timeout: Thee Duration String configuration. Indicates the default forwarding timeout value of the request. If the timeout value is specified in the request, this configuration will be ignored.
  • retry_policy: The retry configuration, which indicates the retry policy applied when the request encounters a specific error. If this field is left unconfigured, no retry will be performed by default.

retry_policy

  1. {
  2. "retry_on":"",
  3. "retry_timeout":"",
  4. "num_retries":""
  5. }
  • retry_on: Boolean. Specifies whether to enable retry.
  • retry_timeout: The Duration String configuration. Indicates the timeout value for each retry. When retry_timeout exceeds the timeout value specified in the route field or request, this configuration is invalid.
  • num_retries: Indicates the maximum number of retries supported.

Last modified December 2, 2022: Bump tar from 4.4.8 to 4.4.19 in /themes/docsy/userguide (942c999)