Skip to content

Commit 1b980df

Browse files
committed
Document advisory storage lease limits
1 parent c1af4a0 commit 1b980df

5 files changed

Lines changed: 33 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ behavior when the change improves security or project direction.
6666
- Acquire storage-bin leases before layout initialization, partition blocking
6767
work by subsystem with critical capacity reserved, and fail closed when a
6868
disk lookup cannot obtain blocking admission.
69+
- Qualify storage-bin leases as advisory and require per-replica storage or
70+
verified cross-node locking plus orchestration-level single-writer controls.
6971
- Pin publishing actions, security-tool installs, and container base images to
7072
immutable reviewed versions and digests.
7173

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Fluxheim is licensed under the European Union Public Licence 1.2.
7373
| --- | --- | --- |
7474
| Proxy cache || Vhost and route-scoped cache policies. |
7575
| Memory cache || Bounded in-memory cache tier. |
76-
| Disk cache || Filesystem and storage-bin disk backends with ordered eviction, one process-wide persistence worker, pre-initialization cross-process lease enforcement, live inspection, fail-closed lookup admission, and coalesced durable index writes. |
76+
| Disk cache || Filesystem and storage-bin disk backends with ordered eviction, one process-wide persistence worker, pre-initialization advisory lease enforcement, live inspection, fail-closed lookup admission, and coalesced durable index writes. |
7777
| Tiered cache || Memory plus disk storage plans. |
7878
| Encrypted disk cache || Optional local-key and OpenBao transit encryption paths. |
7979
| Static-file cache || Optional local static-file caching. |

docs/cache-backends.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,23 @@ internal cache implementation.
235235
- Each allocator acquires an exclusive `.fluxheim-storage-bin.lock` filesystem
236236
lease immediately after creating and canonicalizing the empty root, before
237237
creating or validating the manifest, data directory, index, or bins. The
238-
lease remains held for the allocator's complete lifetime. Another Fluxheim
239-
process, including a second replica pointed at the same persistent volume,
240-
fails to open or initialize the root while that lease is held. Admin and CLI
241-
inspection resolve the registered live cache by vhost/route and never
242-
construct a temporary allocator or write an independent index.
238+
lease remains held for the allocator's complete lifetime. On local filesystems
239+
and shared filesystems with reliable cross-node `flock` semantics, another
240+
cooperating Fluxheim process fails to open or initialize the root while that
241+
lease is held. The lease is advisory: unrelated software can ignore it, and
242+
some NFS/CSI implementations do not provide reliable cross-node advisory
243+
locking. Admin and CLI inspection resolve the registered live cache by
244+
vhost/route and never construct a temporary allocator or write an independent
245+
index.
246+
- Production HA deployments should use one storage-bin root per replica on
247+
local, `ReadWriteOnce`, or `ReadWriteOncePod` storage. Share cache warmth with
248+
peer fill rather than mounting one `ReadWriteMany` root into multiple
249+
replicas. Use shared RWX storage only after a deployment acceptance test has
250+
started two Fluxheim replicas simultaneously, confirmed that the loser fails
251+
before changing the manifest, stopped the winner, and confirmed that the
252+
remaining replica can acquire the lease without changing persisted metadata.
253+
High-assurance deployments must also enforce single-writer ownership at the
254+
orchestration layer.
243255
- Native disk-cache lookup is admitted through a dedicated blocking-work class.
244256
Saturation is distinct from a cache miss: Fluxheim serves an eligible stale
245257
memory object when available and otherwise returns `503` without contacting

docs/config-reference.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,6 +2193,15 @@ table defines the allocator shape:
21932193
reserve full bin files ahead of object writes, and `max_open_bins` bounds the
21942194
number of concurrently opened bin files.
21952195

2196+
The storage-bin backend holds a root-local advisory lock before creating or
2197+
validating persistent layout metadata. Cross-node exclusion therefore depends
2198+
on correct `flock` behavior from the selected filesystem and CSI driver. Use a
2199+
separate local, `ReadWriteOnce`, or `ReadWriteOncePod` cache volume per replica.
2200+
Do not share one RWX storage-bin root between replicas unless cross-node lock
2201+
behavior has been explicitly tested; high-assurance deployments should enforce
2202+
single-writer ownership through orchestration as well. Peer fill is the
2203+
supported mechanism for sharing cache warmth between independent roots.
2204+
21962205
`[cache.disk.encryption]` is disabled by default. When `enabled = true` with
21972206
`provider = "local"`, Fluxheim encrypts disk cache objects with AES-256-GCM
21982207
before they are written to the filesystem or storage-bin backend. The local key

release-notes/RELEASE_NOTES_1.7.7.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ deterministic unsupported-call rejection.
6868
outside request admission for operational work.
6969
- Acquire storage-bin ownership before any manifest or data-layout mutation,
7070
preventing a losing process from modifying first-start metadata.
71+
- Document that storage-bin ownership uses advisory filesystem locking: use a
72+
per-replica local/RWO volume by default, and require verified cross-node
73+
`flock` behavior plus orchestration-level single-writer enforcement before
74+
using shared RWX storage in high-assurance deployments.
7175
- Partition blocking work by class under `224` non-critical and `256` total
7276
ceilings, reserve `32` critical slots, and return `503` rather than contacting
7377
origin when disk-cache lookup admission is saturated and no stale memory

0 commit comments

Comments
 (0)