Skip to content

Add built-in rate limiting support #32

Description

@tw4

Summary

Nexar has no built-in rate limiting mechanism. When integrating with third-party APIs that enforce rate limits, users must implement throttling logic themselves.

Use Cases

  • APIs with requests-per-second or requests-per-minute limits
  • Preventing 429 Too Many Requests errors
  • Controlled burst traffic scenarios

Proposed Solution

Add rate limiting options to NexarConfig using .NET 7+'s built-in System.Threading.RateLimiting primitives.

var config = new NexarConfig
{
    RateLimit = new RateLimitOptions
    {
        RequestsPerSecond = 10,
        BurstSize = 5
    }
};

Alternatively, support a RateLimiter injection point so users can plug in their own limiter (token bucket, sliding window, etc.).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions