Skip to content

Rate limiter HTTP #2016

@archit-2003

Description

@archit-2003

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 RateLimiterConfig struct as an optional parameter to AddHTTPService.

  • Allow configuration of:

    • RequestsPerSecond
    • Burst
  • 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.

Metadata

Metadata

Assignees

Labels

ServiceRelated to external http, grpc communciation , middlewares etc.enhancementNew feature or requestgofr-soc

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions