The direct answer
An asynchronous AI workload should not be controlled with a single concurrency limit. Use a layered control system:
- Accept work only when it fits an explicit queue boundary.
- Cap concurrency separately for each workload class.
- Attach a token budget, retry limit, and spend limit to every job.
- Apply deadlines and priority before work reaches the inference layer.
- Scale GPU capacity only from sustained demand, not from a temporary queue spike.
The goal is not maximum GPU utilization. The goal is to complete enough useful work per unit of time and cost while preventing an expensive job from consuming capacity that customers need.
For a developer entrepreneur, this distinction matters. An unbounded queue can make the monthly invoice look smooth while quietly turning a useful product into a slow one. Every queued job still carries memory, storage, retry, observability, and—once processed—inference cost. Worse, work that waits too long may expire before it produces any value.
Start by separating the workload from the request
A request to an LLM is not one uniform unit of work. A 500-token classification prompt and a 30,000-token document analysis can occupy the same queue while consuming very different GPU time and money.
Inference also has at least two distinct phases. Prefill processes the input prompt. Decode generates the output token by token. Their resource characteristics differ, and long prompts can create substantial KV-cache pressure in a self-hosted deployment. Host-side scheduling can also become a bottleneck for smaller models, so high concurrency does not guarantee proportionate GPU utilization.
That is why a useful async AI job queue carries more than a prompt:
- workload class;
- estimated input tokens;
- maximum output tokens;
- deadline;
- priority;
- idempotency key;
- maximum attempts;
- per-job cost limit;
- tenant or account owner.
Without these fields, the queue can admit work, but it cannot make an intelligent decision about what deserves scarce inference capacity.
Choose queue boundaries before choosing a GPU count
The most common queue mistake is allowing unlimited waiting. An unbounded queue hides overload until many requests time out at once. It also delays the signal that customers may no longer care about the result.
Put admission control in front of the inference workers. It should reject work early when any boundary would be exceeded:
- pending jobs;
- waiting time;
- projected input tokens;
- reserved output tokens;
- tenant queue share;
- remaining job budget;
- available worker capacity.
Use separate boundaries for separate queues. Combining interactive work, document processing, and bulk backfills into one global limit is convenient, but it lets an inexpensive operation starve an expensive one—or lets one customer monopolize the system.
A practical queue design is:
| Queue | Typical deadline | Concurrency policy | Failure behavior |
|---|---|---|---|
| Customer-facing | Seconds to a short deadline | Reserved capacity; small queue | Fast rejection or deadline expiry |
| Customer asynchronous | Minutes to hours | Dedicated worker pool and token budget | Defer, retry, or cancel |
| Internal backfills | Hours to days | Low, adjustable concurrency | Pause and resume |
Do not assume that interactive traffic always belongs in a durable queue. A short-lived request may be better rejected quickly than placed in a backlog whose latency the customer cannot use. Durable queues are most valuable for work that can wait, be resumed, and still produce business value.
Use backpressure as a product decision
Backpressure means refusing or slowing new work before the system becomes overloaded. That sounds like a failure, but it is often a commercial advantage: a controlled rejection protects paid work, interactive latency, and the inference bill.
A robust admission path follows this order:
- Validate the request and identify its workload class.
- Check the customer’s remaining budget and quota.
- Reserve an estimated token allowance.
- Check queue length and oldest-job age.
- Check whether the worker pool can begin the job before its deadline.
- Accept, defer, or reject the job with a machine-readable reason.
Do not silently discard background work. Mark it as deferred, preserve its idempotency key, and specify when it may be retried. If the work has already exceeded its value window, cancel it instead.
For lower-priority queues, shedding should happen in a deliberate order:
- Expire jobs whose deadlines have passed.
- Stop accepting new bulk work.
- Defer or cancel the least valuable queued jobs.
- Preserve customer-facing and customer-paid asynchronous work.
- Reject new work before allowing the backlog to grow without bound.
The exact policy will vary by product, but the design principle is stable: overload should produce controlled decisions, not synchronized retries or an expanding backlog.
Cap concurrency at several levels
Concurrency limits protect workers, but one number rarely describes the whole system. Use separate limits for:
- Model and GPU workers: How many inference calls can run at once?
- Model or pool: Are expensive and inexpensive models competing for the same hardware?
- Tenant: Can one customer consume the entire queue?
- Workload class: Do bulk jobs share capacity with customer work?
- Stage: Can preprocessing and inference consume the same workers?
A useful starting point is to limit concurrency below the point where latency degrades sharply. Do not guess that number once. Load-test representative workloads, then adjust it using three signals:
- queue drain rate;
- completion latency by priority;
- useful output per inference cost.
A high GPU utilization percentage is not sufficient evidence of efficiency. A worker can be highly utilized while producing mostly failed, low-value, or duplicated results. Conversely, a self-hosted GPU can look underutilized if the host CPU cannot schedule work quickly enough.
For asynchronous jobs, define concurrency from work that is actually progressing, not from the number of jobs that have merely been accepted. A job waiting for a worker is queued work, not completed capacity.
Put token and spend budgets on the job
Requests-per-second is a weak cost control because requests vary widely in size. A job queue needs token-level accounting.
Record at least:
- prompt or input tokens;
- requested maximum output tokens;
- actual output tokens;
- cached tokens, if applicable;
- model and deployment used;
- provider or GPU cost attributed to the job;
- retries and their cost;
- total cost including ancillary services.
Assign each job a maximum cost before it starts. If the model supports a hard output limit, use it. If the surrounding system estimates cost rather than enforcing it natively, reject jobs whose reserved allowance exceeds the available budget and stop the job if it crosses the hard limit.
A simple budget formula is:
maximum job cost =
(reserved input tokens / 1,000,000) × input rate
+ (maximum output tokens / 1,000,000) × output rate
+ expected retry allowance
+ ancillary processing cost
Use the current rates from your actual provider or your own cost model. Rates change, and managed APIs may treat input, output, cached, batch, or tool-related usage differently. The formula is therefore a budgeting mechanism, not a substitute for checking current billing documentation.
Then maintain budgets at three levels:
- Per job: Prevents one expensive operation from breaking a customer’s expected economics.
- Per tenant or customer: Prevents one account from monopolizing capacity or spend.
- Per day or month: Protects the business from aggregate traffic surprises.
When a customer budget is exhausted, offer a clear state such as budget_exhausted. Do not disguise it as a generic server error.
Preserve useful work during overload
Not all queued work deserves completion. Define value before defining the queue:
- Is the result still useful after its deadline?
- Is the job idempotent and safe to retry?
- Does another tenant depend on it?
- Has the customer already paid for the outcome?
- Can a cheaper model or smaller context produce an acceptable result?
- Is the output likely to be used, downloaded, or acted upon?
This prevents a subtle failure mode: paying to compute outputs that expire, are duplicated, or are never consumed. Track completion, delivery, and downstream use separately. Queue throughput alone is not business throughput.
Use retries deliberately. A retry can double the cost of one failed operation. Retry only when:
- the failure is transient;
- the deadline still leaves enough time;
- the attempt count remains below the job limit;
- the request is idempotent or has a safe idempotency key;
- the remaining budget can cover the attempt.
Add jitter to retries so failed jobs do not return as one synchronized burst. A client should also honor a provider’s retry guidance where available.
Scale GPUs from sustained pressure
Queue growth is a signal, not a purchasing instruction. A short spike may be better absorbed by a short queue, a short pause, or a scale-down policy. Buying or starting more GPU capacity because the pending count rose can spend money to process work that has already become stale.
Scale on a combination of:
- sustained queue growth;
- age of the oldest eligible job;
- backlogged input and output tokens;
- deadline misses;
- capacity that is blocked by token or spend limits rather than compute;
- utilization and saturation of the actual bottleneck.
Distinguish two conditions that look similar in a dashboard:
- Compute-bound: Workers are busy and the GPU is the limiting resource.
- Policy-bound or host-bound: Workers are available, but the queue is constrained by token budgets, admission rules, or host-side scheduling.
Adding GPUs does not fix either a malformed token budget or a CPU scheduling bottleneck. Before scaling hardware, verify that the queue is admitting the intended workload and that the serving layer has enough context capacity, memory, and host throughput.
If traffic is irregular or low volume, compare the operational cost of keeping capacity warm with the cost of starting capacity on demand. The detailed trade-off is covered in Cold Start vs Warm Pool: Which Inference Bill Wins at Low Volume?.
A minimum viable control loop
You do not need a sophisticated autoscaler to begin. Implement this loop:
- Put every asynchronous inference job in a durable queue.
- Attach tokens, deadline, priority, attempts, idempotency key, and cost limit.
- Divide queues by urgency and workload economics.
- Reserve a worker or token allowance before accepting a job.
- Reject or defer work at the boundary when the allowance is unavailable.
- Enforce maximum output and retry limits.
- Record queue age, token backlog, completion latency, failure rate, and cost per useful outcome.
- Scale only after confirming the bottleneck is sustained and compute-related.
After operating this loop, review the limits weekly. Increase concurrency only if drain time and useful throughput improve without degrading customer-facing latency or budget accuracy. Lower it when the backlog grows while useful throughput stays flat—often a sign that work is too large, too expensive, or no longer valuable.
What to measure
Minimum useful metrics are:
- pending jobs by queue and tenant;
- oldest pending-job age;
- estimated and actual token backlog;
- admission rejections by reason;
- completion latency by workload class;
- GPU and host saturation for self-hosted inference;
- spend per job and per customer;
- retry cost as a share of total inference cost;
- percentage of completed jobs that are actually consumed or acted upon.
The last metric keeps infrastructure decisions tied to founder economics. A queue that processes many expensive jobs but produces little customer value is not efficient; it is simply busy.
Frequently asked questions
Should interactive and background requests use the same queue?
Usually not. They have different deadlines, value windows, and failure expectations. Separate them so bulk processing cannot consume interactive capacity. They may still share a model deployment, but the admission and concurrency boundaries should be independent.
Is high GPU utilization always desirable?
No. Utilization measures activity, not value or efficiency. Evaluate it with latency, backlog age, cost, and downstream completion. Serving systems can also shift bottlenecks to CPU scheduling or memory, particularly when concurrency rises faster than the workload can use it.
How do I set the first concurrency limit?
Begin with a conservative limit, then test representative prompt and output sizes. Increase it while useful throughput improves and deadline misses remain controlled. Do not copy a universal number from another model or product; workload shape and serving hardware matter.
Should retries be automatic?\n
Only within strict limits. Retry transient failures with jitter while respecting the deadline, idempotency, attempt count, and remaining budget. Automatic retries without those boundaries can turn a provider slowdown into a synchronized cost spike.
Does a durable queue control the inference bill by itself?\n
No. A durable queue improves workload control, but cost control requires token accounting, per-job ceilings, tenant budgets, and spend limits. Queueing alone can accumulate expensive work more efficiently.
The bottom line
The safest async AI architecture is not the one with the highest GPU utilization. It is the one that knows which jobs are worth completing, which must run now, how many tokens they may consume, and when to refuse new work.
For an indie developer, this is the practical path to lower infrastructure cost and a more dependable product: enforce boundaries early, measure useful outcomes, and add compute only after demand proves it is necessary.
Sources
- Building a High-Performance LLM Inference System with vLLM: Admission Control, Scheduling
- LLM Serving Backpressure: Queuing, Load Shedding, and Admission Control
- Efficient Request Queueing – Optimizing LLM Performance
- Workload Characterization of Midsize GPU LLM Inference Under High-Concurrency Batching
- High-performance LLM inference
- LLM Optimization: Techniques and Guide







