Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Concurrency Limits Aren’t Enough for LLM APIs

Описание и применение

Традиционные ограничения параллелизма не учитывают размер запросов к LLM, что приводит к неэффективному использованию ресурсов. Решение async-bulkhead-llm ограничивает одновременно количество одновременных запросов и токенов в пути, обеспечивая более сбалансированное распределение нагрузки.

Задача

Traditional concurrency limits treat every request as equal, which is ineffective for LLM workloads where request sizes vary widely in token count, leading to inefficient resource utilization.

Результат

By limiting both concurrent requests and in-flight tokens, the system prevents large requests from monopolizing capacity, improving responsiveness for interactive workloads.

Рабочий процесс

  • Define maxConcurrent and maxInFlightTokens in AsyncBulkhead configuration.
  • Wrap LLM API calls with the bulkhead instance.
  • When a request arrives, check both concurrency and token budgets before admission.
  • If budgets are exceeded, queue or reject the request.
  • Monitor token usage to adjust maxInFlightTokens dynamically if needed.

Доказательства

Instead of limiting only concurrent requests, it can bound two things at once: concurrent requests + estimated in-flight tokens

Источник

  • Дата записи: 2026-09-09T18:46:06.117Z