# How is vLLM handling internal queue requests?

**URL:** <https://discuss.vllm.ai/t/how-is-vllm-handling-internal-queue-requests/2615>\
**Category:** General\
**Created:** [May 4, 2026, 9:59am UTC](https://discuss.vllm.ai/t/how-is-vllm-handling-internal-queue-requests/2615 "2026-05-04T09:59:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ranjith](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@Ranjith](https://discuss.vllm.ai/u/Ranjith)\
**Post date:** [May 4, 2026, 9:59am UTC](https://discuss.vllm.ai/t/how-is-vllm-handling-internal-queue-requests/2615/1 "2026-05-04T09:59:51Z")

</div>

@RunLLM, I know that vLLM is queuing the requests and completing the requests based on concurrency availble KV Cache available. Explain on this. And my questions is on request that get cancelled that is let’s say from client side the request gets timedout or got cancelled How will vLLM cancel executing that specific request from the queue?

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [May 4, 2026, 10:00am UTC](https://discuss.vllm.ai/t/how-is-vllm-handling-internal-queue-requests/2615/2 "2026-05-04T10:00:16Z")

</div>

When a client disconnects or cancels a request (e.g., due to timeout), vLLM detects the HTTP disconnect and aborts the corresponding request. For queued requests, vLLM cancels them before execution; for running requests, it interrupts processing, but the effectiveness depends on the model and pipeline—some requests may only be aborted after the current execution step completes, especially for long-running tasks. GPU resources are released promptly for cancelled requests, but full cleanup may depend on pipeline implementation and granularity of abort checks. This mechanism is already implemented for LLMs and is being improved for diffusion models to check for aborts between execution steps for faster cancellation response times. See details in [vllm-omni issue #1347](https://github.com/vllm-project/vllm-omni/issues/1347) and [vllm issue #20798](https://github.com/vllm-project/vllm/issues/20798).

If you want to actively cancel a request from the client side, simply closing the HTTP connection will trigger vLLM to abort the request. There is no official API endpoint to abort a specific request by ID from the server side; cancellation is handled via client disconnects. For more, see [vllm issue #6975](https://github.com/vllm-project/vllm/issues/6975).

Would you like a step-by-step breakdown of the cancellation flow or more technical details?

Sources:

- [vllm-omni issue #1347](https://github.com/vllm-project/vllm-omni/issues/1347)
- [vllm issue #20798](https://github.com/vllm-project/vllm/issues/20798)
- [vllm issue #6975](https://github.com/vllm-project/vllm/issues/6975)

Hint: Mention @RunLLM in the post for followups.

---

<div class="post-metadata">

**Author:** ![Ranjith](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@Ranjith](https://discuss.vllm.ai/u/Ranjith)\
**Post date:** [May 4, 2026, 10:02am UTC](https://discuss.vllm.ai/t/how-is-vllm-handling-internal-queue-requests/2615/3 "2026-05-04T10:02:52Z")

</div>

@RunLLM How is vLLM handling to abort a request which is already in the queue is it using any hashmap could you explain more on that?

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [May 4, 2026, 10:03am UTC](https://discuss.vllm.ai/t/how-is-vllm-handling-internal-queue-requests/2615/4 "2026-05-04T10:03:17Z")

</div>

vLLM tracks queued requests using a dictionary (hashmap) keyed by request ID, allowing efficient lookup and removal. When a request is aborted (e.g., due to client disconnect), vLLM removes the request from the queue and its internal tracking structures, ensuring it is not scheduled or executed. This is handled in the scheduler logic, where methods like `remove_request` and `remove_requests` are used to delete specific requests from the queue and the internal `requests` dictionary ([API docs](https://docs.vllm.ai/en/latest/api/vllm/v1/core/sched/request_queue/)).

This approach ensures that aborting a queued request is fast and does not require scanning the entire queue. For more, see [request\_queue API](https://docs.vllm.ai/en/latest/api/vllm/v1/core/sched/request_queue/) and [scheduler.py source](https://github.com/vllm-project/vllm/blob/main/vllm/v1/core/sched/scheduler.py).

Would you like a step-by-step explanation of how the abort/removal process works internally?

Sources:

- [API docs](https://docs.vllm.ai/en/latest/api/vllm/v1/core/sched/request_queue/)
- [scheduler.py source](https://github.com/vllm-project/vllm/blob/main/vllm/v1/core/sched/scheduler.py)

Hint: Mention @RunLLM in the post for followups.
