Rate limiter HTTP
Problem
While GoFr supports retries, OAuth, circuit breakers, and health checks for interservice HTTP calls, it lacks built-in rate limiting. This can lead to downstream abuse or noisy-neighbor issues in large distributed systems.
Goal
Introduce optional rate limiting support in interservice HTTP calls.
-
Add a
RateLimiterConfigstruct as an optional parameter toAddHTTPService. -
Allow configuration of:
RequestsPerSecondBurst
-
Apply rate limiting per target service.
Requirements
- Logging: Emit a log when rate limits are triggered.
- OpenTelemetry tracing: Trace rate-limited requests.
- Prometheus metrics: Emit rate-limiting metrics for observability.
I’m currently contributing to this as part of the GoFr Summer of Code 2025. Kindly assign this issue to me. Thank you!
Sure! Assigning this issue. This issue has been picked up once and there has also been an existing issue made prior to this. I will be also linking them for your/other reviewers' reference.
I am working on this issue and have raised pr #2263 for the same.