mirror of
https://github.com/hanzoai/vfs.git
synced 2026-10-30 18:18:21 +00:00
Three new primitives, all brand-neutral:
BlockTimeWorkload(blockTime, avgBlockBytes, monthsRetention,
readAmp, objectBytes) -> Workload
Generic chain-style workload constructor parameterised by
block time so a single sweep covers 1ms..1s with one call.
Tiered{RatePerSecond, HotWindow, ColdRetention, HotBackend,
ColdBackend, PutsPerByte, GetsPerByte, EgressGBPerMonth}
Splits cost between a hot tier (PVC/SSD, no per-op fees) and a
cold tier (object store). The hot window is configurable so
operators can dial query latency vs cost.
Cluster{Writers, Readers, Base, ReadsPerReaderRatio,
EgressPerReaderGBPerMonth}
Models a shared-archive fleet. Content-addressed dedup means
Writers does not multiply storage/PUT cost (the dedup
invariant). Readers each contribute their GET share linearly.
Tests pin three invariants:
TestBlockTimeSweep_PrintsCostCurve — 1ms..1s sweep + hot sizes
TestTiered_24h_Hot_R2_Cold — tiering math sanity
TestCluster_DedupKeepsWriterCostFlat — 1w vs 11w cost identical
TestCluster_ReadersScaleGetCost — 1, 11, 100, 1000 readers