The ConcurrencyLimitingPolicy CustomResourceDefinition (CRD) allows you to preset a policy in the Service Mesh (ASM) traffic scheduling suite. You can declaratively configure the number of concurrent requests for global traffic of a service in an ASM instance. This topic describes the fields of ConcurrencyLimitingPolicy.
ConcurrencyLimitingPolicySpec
ConcurrencyLimitingPolicySpec, the spec section, is the core configuration of ConcurrencyLimitingPolicy.
Field | Type | Required | Description |
concurrency_limiter | Yes | Specifies the configuration of the limiter that performs concurrency limiting. |
ConcurrencyLimiter
ConcurrencyLimiter specifies various parameters for the concurrency limiter.
Field | Type | Required | Description |
max_concurrency | int64 | Yes | The maximum number of concurrent requests. |
parameters | Yes | The parameters for the concurrency limiting policy. | |
request_parameters | No | The configuration of the operations to be performed by the concurrency limiter on requests. The configuration is the same as that for the rate limiter for the RateLimitingPolicy CRD. | |
selectors | []Selector | Yes | The specific requests for which the concurrency limit takes effect. |
ConcurrencyLimiterParameters
Field | Type | Required | Description |
limit_by_label_key | string | No | The request labels that are used by the concurrency limiting policy to group requests. After you specify this field, requests with different labels have their own concurrency limits. For more information about how to specify labels for requests, see Description of request labels. |
max_idle_time | Duration | No | This field takes effect when |
max_inflight_duration | Duration | Yes | The timeout period for request processing. Due to unexpected events such as the restart of pods in the cluster, the ASM traffic scheduling suite may fail to record the request termination event. To prevent such requests from affecting the judgment of the concurrency limiting algorithm, you need to specify the timeout period for request processing. If requests have not been responded to before this timeout period, the system considers that such requests have been processed. You can set this field by evaluating the expected maximum response time of a request. |