Skip to content

Implement client-side rate limiting for adaptive retries.#2

Closed
ubaskota wants to merge 2 commits intoadaptive_retriesfrom
client_rate_limiter
Closed

Implement client-side rate limiting for adaptive retries.#2
ubaskota wants to merge 2 commits intoadaptive_retriesfrom
client_rate_limiter

Conversation

@ubaskota
Copy link
Owner

@ubaskota ubaskota commented Jan 8, 2026

Issue #, if available:

Description of changes:
Implements client-side rate limiting for Adaptive Retries.

Core Components:

  • ClientRateLimiter: Orchestrates rate limiting using token bucket and CUBIC algorithm
  • CubicCalculator: Implements CUBIC congestion control (70% reduction on throttle, cubic scaling on success)
  • RequestRateTracker: Measures actual client request rates using time-bucketed exponential smoothing

Testing:

  • All tests pass with proper mocking to avoid time
  • Edge case testing for throttling, success responses, and rate capping are covered.
  • Type checking and linting pass without errors.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ubaskota ubaskota closed this Jan 8, 2026
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