The ConcurrencySchedulingPolicy CustomResourceDefinition (CRD) is part of the Service Mesh (ASM) traffic scheduling suite. It limits concurrent requests and uses priority-based scheduling to handle excess traffic.
How it works
ConcurrencySchedulingPolicy combines two mechanisms:
Concurrency limiting:
max_concurrencysets the maximum number of simultaneous requests.concurrency_limiterconfigures the concurrency limiter.Priority-based scheduling: When concurrent requests exceed
max_concurrency,schedulerschedules excess requests based on their priorities.
Both mechanisms apply only to requests that match the selectors criteria.
ConcurrencySchedulingPolicySpec
ConcurrencySchedulingPolicySpec is the top-level configuration under the spec field.
| Field | Type | Required | Description |
|---|---|---|---|
concurrency_scheduler | ConcurrencyScheduler | Yes | Concurrency limiting and priority-based scheduling configuration. |
ConcurrencyScheduler
ConcurrencyScheduler defines the concurrency limit, the limiter algorithm, the priority scheduler, and the request selectors.
| Field | Type | Required | Description |
|---|---|---|---|
max_concurrency | int64 | Yes | Maximum number of concurrent requests allowed. |
concurrency_limiter | ConcurrencyLimiterParameters | Yes | Configuration for the concurrency limiter. |
scheduler | Scheduler | Yes | Configuration for the scheduler that schedules requests based on their priorities when the number of concurrent requests exceeds max_concurrency. |
selectors | []Selector | Yes | Selectors that determine which requests this policy applies to. |