<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jaycodes</title>
    <description>The latest articles on DEV Community by jaycodes (@janbalangue).</description>
    <link>https://dev.to/janbalangue</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3729482%2Fa15eeb0a-1b2e-48eb-b630-2886e978bc35.png</url>
      <title>DEV Community: jaycodes</title>
      <link>https://dev.to/janbalangue</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/janbalangue"/>
    <language>en</language>
    <item>
      <title>Concurrency Limits Aren’t Enough for LLM APIs</title>
      <dc:creator>jaycodes</dc:creator>
      <pubDate>Tue, 25 Aug 2026 03:27:59 +0000</pubDate>
      <link>https://dev.to/janbalangue/concurrency-limits-arent-enough-for-llm-apis-4lgm</link>
      <guid>https://dev.to/janbalangue/concurrency-limits-arent-enough-for-llm-apis-4lgm</guid>
      <description>&lt;p&gt;A concurrency limit treats every request as roughly equal.&lt;/p&gt;

&lt;p&gt;For LLM workloads, that assumption breaks down.&lt;/p&gt;

&lt;p&gt;A request with a 500-token budget and one with a 30,000-token budget might both occupy a single concurrency slot, but they can represent very different amounts of provider capacity.&lt;/p&gt;

&lt;p&gt;That’s the problem I built async-bulkhead-llm to address.&lt;/p&gt;

&lt;p&gt;Instead of limiting only concurrent requests, it can bound two things at once:&lt;/p&gt;

&lt;p&gt;concurrent requests&lt;br&gt;
+&lt;br&gt;
estimated in-flight tokens&lt;/p&gt;

&lt;p&gt;A request is admitted only when both budgets have enough capacity.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bulkhead&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AsyncBulkhead&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;maxConcurrent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;maxInFlightTokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="nx"&gt;_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives you a bulkhead around an LLM provider that accounts for workload size rather than simply request count.&lt;/p&gt;

&lt;p&gt;This becomes especially useful when interactive and large batch requests share the same upstream model. A conventional concurrency limiter can still allow a few very large requests to consume most of the useful capacity.&lt;/p&gt;

&lt;p&gt;Token-aware admission gives you another control surface.&lt;/p&gt;

&lt;p&gt;async-bulkhead-llm is an open-source TypeScript/npm library I’ve been developing specifically around this problem.&lt;/p&gt;

&lt;p&gt;The broader lesson has been simple: for LLM systems, concurrency is only one dimension of load.&lt;/p&gt;

&lt;p&gt;If you're building production LLM infrastructure, I'd be interested in how you're handling admission control and overload protection.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>node</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
