bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/System Design/Design a Rate Limiter
System Design•Design a Rate Limiter

Design a Rate Limiter: High-Level Architecture

Design a distributed rate limiter that caps how many requests a client (API key / IP) can make per time window.

How to approach it

Sketch the request path from the client inward: client → edge/CDN → load balancer → stateless services → cache → database, with queues and workers off to the side for async work. Keep services stateless so they scale horizontally. Draw the happy path first; resilience and scale come after.

Components

ComponentRole
Clientcaller
API Gatewayruns the limiter middleware
Limitertoken-bucket / sliding-window logic
Redisshared atomic counters (INCR + TTL)
Backend Servicehandles allowed requests

Request path

Client → API Gateway → Limiter → Redis → Backend Service

Previous

Design a Rate Limiter: API & Data Model

Next

Design a Rate Limiter: Scaling