State
Several gateway features need to remember things between requests — and, when you run more than one replica, between instances. Octopus stores that shared runtime state in a pluggable state store so features behave consistently whether you run one process or many.
What uses the state store01
Rate limiting — request counters and windows, so limits are enforced across all replicas.
Caching — cached upstream responses.
Sessions & tokens — authentication caches and session data.
Circuit breakers — shared failure counts and breaker state.
Coordination — locks and other coordination primitives.
Backends02
| Backend | Scope | Use case |
| In-memory | Per process | Local development and single-instance deployments. |
| Redis | Shared | Multi-replica deployments needing fast shared counters and caches. |
| Postgres | Shared, durable | Shared state that must survive restarts. |
| Hybrid | Tiered | A fast local tier backed by a shared tier. |