State & Storage
Caches, durable structures, session stores, KV, content-addressed object storage.
When to read this section
You are building something that holds data: a cache, a session store, a KV API, a content-addressed object store, a counter, a list. The naive approach (a long-lived process with in-memory state and ad-hoc persistence) breaks the moment a node drains, a tenant exceeds quota, or a memory burst arrives. These recipes show the lease-backed alternative.
Suggested order
- Distributed Counter and Shared List — the smallest stateful programs. Show how a fabric-backed data structure looks in code.
- Content-Addressed Object Storage — adds durable bytes, manifests, integrity checks.
- Elastic Cache That Grows Without Restarting and Stateful KV API With Fabric-Backed Storage — production-shape patterns with capacity that responds to demand instead of operator restarts.
- Resilient Session Store With Managed Lease Renewal and Computation That Survives a Power Outage — failure-recovery variants. Read these when you are sure the basics fit your problem.
- Replicated Session Continuation and Encrypted Key-Value Store With Automatic Key Retirement — multi-cloud and encryption variants.
- A Shared Filesystem That Disappears When Nobody Is Using It — the cost-aware variant. Capacity that returns when idle, not when an operator notices.
What’s not here
GPU memory leases for inference KV caches. See GPU & Inference. Cross-region replication topology. See Placement, Scaling & Operations.