Skip to content

Let caller allow concurrent requests - #72

Open
pyrogenic wants to merge 2 commits into
aknorw:masterfrom
pyrogenic:feat/max-concurrent
Open

pyrogenic wants to merge 2 commits into
aknorw:masterfrom
pyrogenic:feat/max-concurrent

Conversation

@pyrogenic

Copy link
Copy Markdown

createLimiter hardcodes maxConcurrent: 1, which serializes requests. If requests average > 1s, you won't actually reach the number of requests per minute allowed (60). This change lets callers have multiple requests in-flight.

I have a large collection (11 pages of collection, then inventory, lists, etc.). Refreshing it with serial requests stayed far under 60 requests/min, and with maxConcurrent: 5 I could reach my configured ceiling (48) without any 429s.

pyrogenic and others added 2 commits August 22, 2026 00:47
`maxConcurrent` was hardcoded to 1, so throughput was
`1 / max(minTime, latency)` rather than the configured rate.
With a 60/minute limit and 2s responses that is 30
requests/minute -- half the allowance, and no setting could
recover it.

Concurrency is independent of the rate limit here: `minTime`
still spaces request *starts*, so raising this cannot exceed
the configured requests-per-interval. It only stops latency
from dragging throughput below the target.

Defaults to 1, so existing behaviour is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pyrogenic
pyrogenic marked this pull request as ready for review August 23, 2026 02:58

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant