Skip to content

Use min(global, per_call) for batch rate limiting#12

Merged
liquidsec merged 2 commits into
stablefrom
rate-limit-min
Mar 28, 2026
Merged

Use min(global, per_call) for batch rate limiting#12
liquidsec merged 2 commits into
stablefrom
rate-limit-min

Conversation

@liquidsec

Copy link
Copy Markdown
Collaborator

Summary

  • When both a client-level rate limit (set_rate_limit) and a per-call rate_limit are provided to request_batch, the more restrictive (lower RPS) limit is now used
  • Previously the client-level limit won unconditionally, which meant per-call limits from modules like web_brute were silently ignored when a global limit was configured
  • Adds interval() accessor to RateLimiter
  • Bumps version to 0.1.4

Behavior matrix

Global Per-call Result
Set Not set Global applies
Not set Set Per-call applies
Both set, global stricter Global wins
Both set, per-call stricter Per-call wins
Neither Unlimited

When both a client-level rate limit (set_rate_limit) and a per-call
rate_limit are provided to request_batch, the more restrictive (lower
RPS) limit is now used. This lets callers enforce a tighter rate for
specific batch operations without overriding the global limit for
other callers.

Bump version to 0.1.4.
@liquidsec liquidsec merged commit c9c4f12 into stable Mar 28, 2026
12 checks passed
@liquidsec liquidsec deleted the rate-limit-min branch June 29, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant