Queuing lets you submit runs beyond your allowed maximum concurrency limits. Queues are maintained for each execution class and ordered by priority then age. The next run started upon a completion will be the highest priority, oldest request for the execution class of the completed run.
A priority is between 1 (highest) and 9, with a priority 6 by default. Since queuing is specific to execution classes, run requests in execution classes that are not at limit will start without delay.
In some cases you may not want a run request to queue. An example could be a real time workload that must complete in a short time. In that case when you submit you specify no queuing behavior in the request, and you'll receive a busy failure if you are at capacity that and you can then manage immediately.
By default runs are queued if capacity does not exist. Queued runs have a default priority of 6. Disable queuing if you prefer to receive a busy error (429) if no capacity remains for the execution class.
Using priorities and queuing
There are several ways to specify queuing behaviors.
When defined as part of an instance configuration
Nextmv CLI.
- Use the
-p, --priority
flag to specify priority. - use the
--no-queuing
flag to disable queuing.
- Use the
Cloud API.
- Set the
configuration.queuing.priority
field to specify priority (1-9). - Set the
configuration.queuing.disabled
field totrue
to disable.
- Set the
Nextmv CLI.
- Use the
-p, --priority
flag to specify priority. - use the
--no-queuing
flag to disable queuing.
- Use the
Cloud API.
- Set the
configuration.queuing.priority
field to specify priority (1-9). - Set the
configuration.queuing.disabled
field totrue
to disable.
- Set the
When starting a running with the CLI
As part of the run, when running remotely. Use one of the following interfaces.
- Nextmv CLI.
- Use the
-p, --priority
flag to specify priority. - use the
--no-queuing
flag to disable queuing.
- Use the
When starting a run with the API
- Cloud API.
- Set the
configuration.queuing.priority
field to specify priority (1-9). - Set the
configuration.queuing.disabled
field totrue
to disable
- Set the
Here is a full example for using the cloud API when starting a run.
New application run.
Create new application run.
When starting a run with the Python SDK
You can use the configuration
argument. Here is an example: