Contention Profile

A Contention Profile is a reusable policy that throttles how the Dispatcher releases Tasks onto a Platform. Profiles are created once and linked to one or more Platforms; the Dispatcher checks every linked profile when deciding whether to claim a queued Task.

Editor overview

The editor has two tabs:

  • General — name, type, scope, and enabled flag. The type is locked after first save and cannot be changed.
  • Settings — type-specific attribute values. This tab is only available once a type has been selected.

Fields

Field Description
Name Display name for the profile.
Type Contention strategy — Concurrency Contention or Rate Limit. Locked after creation.
Scope Per Platform (default) or Global — see below.
Enabled When unchecked the profile is ignored by the Dispatcher even if linked.

Profile types

Concurrency Contention

Caps how many Tasks can be running at the same time. Use it to protect a platform or downstream service with a fixed amount of capacity, such as a cluster, a warehouse, or a database that slows under parallel load.

Attribute Description
Max Concurrent Tasks How many linked runs may be active at once.
Exceed Action What happens to a run when the limit is reached — see below.
Queue Size Limit (Wait In Queue only, optional) How many runs may wait.
Queue Timeout Seconds (Wait In Queue only, optional) How long a run may wait before it is taken out of the queue without running.

Rate Limit

Caps how often Tasks are released, to stay inside a provider's API or quota limits. Choose an algorithm:

Algorithm Behaviour Attributes
Token Bucket (default) Allows short bursts up to the bucket size, then releases runs at the refill rate. Bucket Capacity, Refill Rate, Refill Rate Frequency
Leaky Bucket Smooths releases into a steady flow. Bucket Capacity, Leak Rate, Leak Rate Frequency
Sliding Window At most Limit releases in any rolling window. Limit, Window Seconds

Rate frequencies default to per second. A Rate Limit profile also has an Exceed Action.

Exceed actions

Action What happens when the limit is reached
Wait In Queue (default) The run stays queued and is released as soon as capacity is available.
Reject Immediately The run is rejected instead of waiting.
Reject Low Priority Runs with Low priority are rejected; Normal, High and Critical runs wait in the queue.

Queued runs are released in priority order. You can see what each queued run is blocked by on the Task Dispatcher Status dashboard in Monitoring.

If a profile's settings are missing or invalid, the profile does not block runs. Check the Settings tab after creating a profile.

Scope

  • Per Platform (default, recommended) — the profile keeps a separate count or bucket for each linked Platform.
  • Global — every linked Platform shares one count or bucket. Use this only when the linked platforms share a downstream bottleneck (for example the same database).

Linking and composition

A profile takes effect after you link it to one or more Platforms. A run must satisfy every enabled profile linked to its Platform — limits compose, so you can combine a concurrency cap with a rate limit. Profile changes are picked up by the Dispatcher on its next scheduling cycle; no restart is needed.

A rate limit counts a run only when the run is about to start. A run still waiting for a dependency or for a concurrency slot uses none of the allowance, and a run that one rate limit admits but another refuses gets its place back. A run that a rate limit holds back does not keep a concurrency slot either, so no other run is rejected because of it.

Disabling a profile (clearing Enabled) is the safest way to lift a limit temporarily without deleting the profile or unlinking it from Platforms.

Contention profiles manage shared capacity across many Tasks. To stop a single Task overlapping with itself, use its Max Concurrent Runs setting instead — see Task.

Contention and the Monitoring Agent

When a run is blocked by a contention profile, or rejected because a limit was reached, the run's record says so. The Monitoring Agent reads that state and reports it: a run waiting on a lock, a profile that is spending its allowance on other tasks, or a rejection that keeps repeating. It does not release a lock, raise a limit or start a blocked run, and it cannot change a profile.

See The AI Monitoring Agent.

Best practices

  • Start with Per Platform scope. Switch to Global only if you measure a shared bottleneck.
  • Use Concurrency to protect downstream services with a fixed thread pool; use Rate Limit to satisfy provider quotas.
  • Combine both — a Concurrency profile to cap simultaneous runs and a Rate Limit to smooth bursts is a common, safe baseline.
  • Disable a profile rather than deleting it when load-testing, so the Platform links are preserved.