Inkline
Menu

Rate limiter

Templates
Rate limiter 7 items and 6 connections. Edge Rules request check take token (atomic) allowed load push rules API client API gateway Rate-limit middleware Redis (token buckets) Backend API Rules store Rules loader
Rate limiter — preview
Architecture

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