Templates / flowchart

Request throttling logic

Rate-limiting decision logic with quota checks and retry hints. A template for API behavior documentation.

Open in studio

Preview

Mermaid 11 renderer

Rendering preview...

Mermaid source

flowchart

flowchart TD
    req[Incoming request] --> auth{Valid API key?}
    auth -->|no| deny401[Return 401]
    auth -->|yes| quota{Quota remaining?}
    quota -->|yes| serve[Process request]
    quota -->|no| burst{Burst allowance left?}
    burst -->|yes| serveSlow[Process at reduced priority]
    burst -->|no| deny429[Return 429 + Retry-After]
    serve --> log[Record usage]
    serveSlow --> log

More templates