Platform Extension

API Rate Limiter

Configurable rate limiting for API endpoints with multiple strategies.

FreeComing Soon

Overview

The API Rate Limiter qBit protects your qqq APIs from abuse and ensures fair usage across clients. Configure rate limits per endpoint, user, or API key with multiple limiting strategies.

Features

  • Multiple Strategies - Fixed window, sliding window, and token bucket algorithms
  • Flexible Keys - Rate limit by IP, user ID, API key, or custom attributes
  • Per-Endpoint Limits - Different limits for different API operations
  • Burst Handling - Allow short bursts while maintaining overall limits
  • Response Headers - Standard rate limit headers for client awareness

Use Cases

  • Public APIs needing protection from abuse
  • Multi-tenant systems with per-tenant quotas
  • Applications requiring fair resource allocation
  • APIs with tiered access levels

Installation

bash
qqq install qbit-rate-limiter --license YOUR_LICENSE_KEY

Configuration

Apply rate limiting to your API:

java
new QInstance()
   .withRateLimiter(new RateLimiterConfig()
      .withStrategy(RateLimitStrategy.SLIDING_WINDOW)
      .withLimit(1000)
      .withWindowSeconds(60)
      .withKeyExtractor(RateLimitKey.API_KEY));

Requirements

  • qqq Framework 1.0+
  • Java 21+
  • Redis (for distributed rate limiting)
  • QRunIO account with valid license key

Ready to build faster?