githubEdit

Throttling

Introduction

Protect your webhook endpoints from abuse and ensure fair resource usage with Webhooked's comprehensive rate limiting capabilities.

circle-info

Rate limiting is applied per client IP, keep it in mind

Rate Limiting Algorithms

Sliding Window

throttling:
  enabled: true
  maxRequests: 1000
  window: 3600        # 1 hour sliding window

Token Bucket Algorithm

The default algorithm used by Webhooked:

throttling:
  enabled: true
  maxRequests: 100    # Bucket capacity
  window: 60          # Refill rate: 100 tokens per 60 seconds
  burst: 20           # Allow bursts up to 20 requests

How it works:

  1. Bucket starts with maxRequests tokens

  2. Each request consumes one token

  3. Tokens refill at rate of maxRequests/window

  4. Burst allows temporary exceeding of rate

Request Queuing

Basic Queue Configuration

Queue Behavior

When rate limit is exceeded:

  1. Request enters queue if capacity available

  2. Waits for token to become available

  3. Processes when token available or timeout

  4. Returns configured status code on timeout

Configuration

Property
Description
Default
Example

enabled

Enable rate limiting

false

true

maxRequests

Max requests per window

-

1000

window

Time window (seconds)

-

60

burst

Burst capacity

-

50

burstWindow

Burst window (seconds)

-

10

queueCapacity

Request queue size

0

100

queueTimeout

Queue timeout (seconds)

0

5

queueTimeoutCode

Status code on timeout

503

503

Common Configurations

API Rate Limiting

Standard API rate limiting:

Webhook Protection

Protect against webhook storms:

High-Traffic Configuration

For high-volume webhooks:

Last updated