Rate limiter
TemplatesArchitecture
A rate-limit middleware at the edge takes tokens from buckets in Redis atomically; rules are loaded from a store and pushed to the limiter out of band.
What is inside
- Token buckets in Redis
- Rules loaded out of band
- Allowed path to the backend
Use this template
Opens in the playground, no account needed. Sign up to save it.
Show the Inkline text
diagram architecture "Rate limiter"
direction right
theme light
client caller "API client"
zone edge "Edge" {
service gateway "API gateway"
service limiter "Rate-limit middleware"
}
cache buckets "Redis (token buckets)"
service api "Backend API"
group control "Rules" {
store rules "Rules store"
fn loader "Rules loader"
}
caller -> gateway : request
gateway -> limiter : check
limiter -> buckets : take token (atomic)
limiter -> api : allowed
rules -> loader : load
loader ~> limiter : push rules