Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/renja-g/RiftRelay/llms.txt

Use this file to discover all available pages before exploring further.

What is RiftRelay?

RiftRelay is a rate-limiting proxy that sits between your application and Riot’s API, managing rate limits intelligently so you don’t have to. Built in Go, it handles the complexity of respecting rate limits while maximizing your API throughput. Instead of hitting rate limits and dealing with 429 errors, RiftRelay queues your requests and spreads them evenly across the remaining rate limit window. This prevents sudden bursts and ensures smooth, consistent API usage.

Why use RiftRelay?

When you make requests directly to Riot’s API, you need to:
  • Track rate limits across multiple endpoints and regions
  • Handle 429 responses and implement retry logic
  • Manage request pacing to avoid hitting limits
  • Coordinate rate limits across multiple parts of your application
RiftRelay eliminates all of this complexity. You simply send requests through the proxy using the format /{region}/{riot-api-path}, and RiftRelay handles the rest.

Key features

Intelligent rate limiting

Automatically spreads requests evenly across rate limit windows to avoid bursts and maximize throughput

Multi-token support

Use multiple Riot API tokens as comma-separated values to increase your rate limits

Priority requests

Add X-Priority: high header to bypass pacing delays while still respecting rate limits

Integrated Swagger UI

Explore and test API endpoints through the built-in Swagger interface at /swagger/

Request queuing

Configurable queue capacity (default 2048) with admission timeout controls

Metrics & monitoring

Optional Prometheus metrics endpoint and pprof profiling for performance insights

Graceful shutdown

Drains pending requests on shutdown to ensure no data loss

Production-ready

Docker support with security hardening, health checks, and proper signal handling

How it works

When requests arrive at RiftRelay:
  1. Routing: RiftRelay parses the request path to determine which rate limit bucket it belongs to
  2. Queuing: Requests are added to a priority queue based on their urgency and arrival time
  3. Scheduling: A scheduler picks requests from the queue and sends them when there’s capacity in the rate limit window
  4. Pacing: Instead of sending all requests at once when limits reset, RiftRelay spreads them out evenly over time
  5. Tracking: Rate limits are tracked based on response headers from Riot’s API
If there’s no room in the rate limit window, RiftRelay returns 429 Too Many Requests with a Retry-After header telling you when to try again.

Real-world use case

┌─────────────┐        ┌─────────────┐        ┌─────────────┐
│             │        │             │        │             │
│  Your App   │───────▶│  RiftRelay  │───────▶│  Riot API   │
│             │        │             │        │             │
└─────────────┘        └─────────────┘        └─────────────┘

                             │ • Rate limiting
                             │ • Request queuing
                             │ • Priority handling
                             │ • Token rotation
Your application makes requests to RiftRelay as if it were the Riot API. RiftRelay proxies these requests to the actual Riot API while managing all rate limiting concerns transparently.

Get started

Quickstart

Get RiftRelay running in under 2 minutes with Docker

Installation

Detailed installation options including Docker, Docker Compose, and from source

Configuration

Learn about environment variables, queue settings, and advanced options

API reference

Explore endpoints, headers, and response formats

Build docs developers (and LLMs) love