StackPractices

Tag: rate-limiting

Browse 20 practical software engineering resources tagged with "rate-limiting". Discover code recipes, design patterns, documentation templates, and in-depth guides to help you build, deploy, and maintain production-ready solutions involving rate-limiting. Each resource is written for engineers who ship real systems, with copy-paste examples and practical trade-offs.

Rate Limiting and Throttling

Rate limiting protects services from abuse, bursts, and cascading overload. The right strategy depends on the client, the resource, and the desired user experience during high traffic.

The recipes below cover token bucket, sliding window, fixed window, distributed rate limiting with Redis, and client-friendly headers. Each guide explains how to enforce limits without breaking legitimate traffic.

Every resource includes clear explanations, copy-paste code, and practical warnings. Use them to make informed decisions, avoid production pitfalls, and speed up your delivery. If you are just getting started, read the beginner-friendly articles first; if you are experienced, jump straight to the advanced patterns and architecture guides. New resources are added regularly, so bookmark this page and check back for the latest patterns.

API Rate Limiting

Protect APIs from abuse and ensure fair resource usage with token bucket, sliding window, and leaky...

Implement API Rate Limiting with Redis

Protect APIs from abuse with Redis-backed token bucket and sliding window limiters, including burst...

Python API Rate Limiting with Token Bucket

Implement token bucket rate limiting in Flask and FastAPI with Redis support

Rate Limiting

How to implement API rate limiting using token bucket, sliding window, and fixed window algorithms...

Design a Scalable API Gateway for Microservices

Build an API gateway that routes requests, handles authentication, rate limiting, caching, and...

Rate Limiting with Redis Token Bucket Algorithm

Implement a distributed token bucket rate limiter using Redis atomic operations for API throttling...

asyncio.Semaphore: Limit Concurrent API Calls in Python

Use asyncio.Semaphore in Python to cap concurrent API calls, database queries, and resource access...

Debounce and Throttle Functions in JavaScript

Control function execution rate with debounce and throttle. Covers leading and trailing edge,...

Distributed Rate Limiting with FastAPI and Redis

Implement distributed rate limiting in FastAPI using Redis sliding window and token bucket...

Rate Limiting for API Security: Block Abuse and Brute Force

Use rate limiting as a security control against brute-force, credential stuffing, scraping, and L7...

Serverless Throttling Pattern

Handle backpressure in serverless by using SQS, token buckets, and concurrency limits to protect...

Throttling Pattern

Limit the rate at which a system processes requests or consumes resources to prevent overload,...

Token Bucket Rate Limiter: Smooth Traffic with Token Buckets

How to implement token bucket rate limiting for API protection — bucket refill, burst handling,...

API Rate Limiting Policy Template

A template for defining API rate limits per consumer tier, including burst allowances, quota...

API Security Review Template (OWASP Checklist)

A fillable checklist template for reviewing API authentication, authorization, rate limiting, and...

Complete Guide to GraphQL Security

Secure a production GraphQL API: introspection control, depth and cost limits, rate limiting,...

API Gateway Design: Resilience, Routing, and Security

A practical guide to designing API gateways: routing, authentication, rate limiting, circuit...

API Rate Limiting — Design Fair and Useful Throttling

A practical guide to API rate limiting: token bucket, leaky bucket, sliding window algorithms,...

API Security Checklist — Authentication to Encryption

A thorough security checklist for APIs: authentication, authorization, input validation, rate...

Complete Guide to API Security

Secure your APIs end-to-end. Covers rate limiting, authentication, input validation, CORS, SQL...