Dubbo Proxy Route Configuration

This documentation is for the Envoy v3 API.

As of Envoy v1.18 the v2 API has been removed and is no longer supported.

If you are upgrading from v2 API config you may wish to view the v2 API documentation:

config/filter/network/dubbo_proxy/v2alpha1/route.proto

Dubbo Proxy configuration overview.

extensions.filters.network.dubbo_proxy.v3.RouteConfiguration

[extensions.filters.network.dubbo_proxy.v3.RouteConfiguration proto]

  1. {
  2. "name": "...",
  3. "interface": "...",
  4. "group": "...",
  5. "version": "...",
  6. "routes": []
  7. }

name

(string) The name of the route configuration. Reserved for future use in asynchronous route discovery.

interface

(string) The interface name of the service. Wildcard interface are supported in the suffix or prefix form. e.g. *.methods.add will match com.dev.methods.add, com.prod.methods.add, etc. com.dev.methods.* will match com.dev.methods.add, com.dev.methods.update, etc. Special wildcard * matching any interface.

Note

The wildcard will not match the empty string. e.g. *.methods.add will match com.dev.methods.add but not .methods.add.

group

(string) Which group does the interface belong to.

version

(string) The version number of the interface.

routes

(repeated extensions.filters.network.dubbo_proxy.v3.Route) The list of routes that will be matched, in order, against incoming requests. The first route that matches will be used.

extensions.filters.network.dubbo_proxy.v3.Route

[extensions.filters.network.dubbo_proxy.v3.Route proto]

  1. {
  2. "match": "{...}",
  3. "route": "{...}"
  4. }

match

(extensions.filters.network.dubbo_proxy.v3.RouteMatch, REQUIRED) Route matching parameters.

route

(extensions.filters.network.dubbo_proxy.v3.RouteAction, REQUIRED) Route request to some upstream cluster.

extensions.filters.network.dubbo_proxy.v3.RouteMatch

[extensions.filters.network.dubbo_proxy.v3.RouteMatch proto]

  1. {
  2. "method": "{...}",
  3. "headers": []
  4. }

method

(extensions.filters.network.dubbo_proxy.v3.MethodMatch) Method level routing matching.

headers

(repeated config.route.v3.HeaderMatcher) Specifies a set of headers that the route should match on. The router will check the request’s headers against all the specified headers in the route config. A match will happen if all the headers in the route are present in the request with the same values (or based on presence if the value field is not in the config).

extensions.filters.network.dubbo_proxy.v3.RouteAction

[extensions.filters.network.dubbo_proxy.v3.RouteAction proto]

  1. {
  2. "cluster": "...",
  3. "weighted_clusters": "{...}"
  4. }

cluster

(string) Indicates the upstream cluster to which the request should be routed.

Precisely one of cluster, weighted_clusters must be set.

weighted_clusters

(config.route.v3.WeightedCluster) Multiple upstream clusters can be specified for a given route. The request is routed to one of the upstream clusters based on weights assigned to each cluster. Currently ClusterWeight only supports the name and weight fields.

Precisely one of cluster, weighted_clusters must be set.

extensions.filters.network.dubbo_proxy.v3.MethodMatch

[extensions.filters.network.dubbo_proxy.v3.MethodMatch proto]

  1. {
  2. "name": "{...}",
  3. "params_match": "{...}"
  4. }

name

(type.matcher.v3.StringMatcher) The name of the method.

params_match

(repeated map<uint32, extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParameterMatchSpecifier>) Method parameter definition. The key is the parameter index, starting from 0. The value is the parameter matching type.

extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParameterMatchSpecifier

[extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParameterMatchSpecifier proto]

The parameter matching type.

  1. {
  2. "exact_match": "...",
  3. "range_match": "{...}"
  4. }

exact_match

(string) If specified, header match will be performed based on the value of the header.

Only one of exact_match, range_match may be set.

range_match

(type.v3.Int64Range) If specified, header match will be performed based on range. The rule will match if the request header value is within this range. The entire request header value must represent an integer in base 10 notation: consisting of an optional plus or minus sign followed by a sequence of digits. The rule will not match if the header value does not represent an integer. Match will fail for empty values, floating point numbers or if only a subsequence of the header value is an integer.

Examples:

  • For range [-10,0), route will match for header value -1, but not for 0, “somestring”, 10.9, “-1somestring”

Only one of exact_match, range_match may be set.