ARCHOS 525 BLUEPRINT · /d/pilot-rate-limiter
Rate limiter system
11 COMPONENTS · 10 FLOWS · UPDATED 2026-11-19
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/pilot-rate-limiter) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/pilot-rate-limiter)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/pilot-rate-limiter" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Rate limiter system — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0[("API clients")]
sink_1[("Client consumer")]
lb_2["Load balancer"]
gw_3["API gateway"]
config_4[("Limit rules")]
limiter_5[("Rate limiter")]
counters_6[("Counter primary")]
replica_7[("Counter replica")]
app_8["API workers"]
db_9[("Orders database")]
metrics_10[("Metrics store")]
client_0 -->|"1. Calls · HTTPS"| lb_2
lb_2 -->|"2a. Routes · HTTP/2"| gw_3
lb_2 -->|"2b. Reply · HTTPS"| sink_1
gw_3 -->|"3a. Check · gRPC check"| limiter_5
gw_3 -->|"3b. Allow · HTTP/2"| app_8
limiter_5 -->|"4a. Lua eval · RESP EVAL"| counters_6
limiter_5 -.->|"4b. Counts · OTLP"| metrics_10
app_8 -->|"4c. Commits · SQL"| db_9
counters_6 -->|"5. Replicates · async repl"| replica_7
config_4 -->|"Rules · push rules"| limiter_5COMPONENT STACK (11)
- API clientsSTATEFULbrowsers, mobile, partners
- Client consumerSTATEFULreceives allowed or 429 response
- Load balancerSTATELESSterminates TLS, connection caps
- API gatewaySTATELESSauthenticates, asks the limiter
- Limit rulesSTATEFULper-key quotas, versioned
- Rate limiterSTATEFULtoken bucket, rules from config
- Counter primarySTATEFULatomic Lua script
- Counter replicaSTATEFULwarm standby
- API workersSTATELESSserve allowed requests
- Orders databaseSTATEFULsystem of record
- Metrics storeSTATEFULallow and deny counts
REQUEST & DATA FLOW (10)
- API clients → Load balancer (Calls)[HTTPS]
- Load balancer → API gateway (Routes)[HTTP/2]
- Load balancer → Client consumer (Reply)[HTTPS]
- API gateway → Rate limiter (Check)[gRPC check]
- API gateway → API workers (Allow)[HTTP/2]
- Rate limiter → Counter primary (Lua eval)[RESP EVAL]
- Rate limiter → Metrics store (Counts)[OTLP]
- API workers → Orders database (Commits)[SQL]
- Counter primary → Counter replica (Replicates)[async repl]
- Limit rules → Rate limiter (Rules)[push rules]