WORKLOAD PATTERN

Grow your cache. Control the memory bill.

For Redis-backed catalog, content, and API caches whose retained value payload is growing faster than their traffic. Put value capacity on NVMe SSD and evaluate the full request path against your latency budget.

v0.1.0-beta.1Redis / ValkeyNVMe SSD

Why capacity and latency collide

The expensive part of a mature cache is often its long tail: product variants, rendered fragments, tenant-specific responses, and objects that are read infrequently but costly to reconstruct. Shortening TTLs or evicting more aggressively frees memory by sending work back to the origin.

An SSD-backed cache only solves that problem if disk-resident reads still fit the application budget. A warm-cache average hides broad key access, cache churn, and the origin traffic that follows timeouts. Compare useful responses delivered before the deadline, rather than stored bytes alone.

DESIGN FOR THIS DATA PATH

Where Lavik fits

Lavik keeps its key index in DRAM and uses NVMe SSD for value storage. That changes the capacity cost of retaining a broader cache while preserving a Redis-compatible request interface. Start with rebuildable cached objects, retain your source of truth, and measure how the added retention changes hit rate and origin load.

REQUEST PATHAPI / page-serving serviceRedis-compatible client
LavikDRAM · key indexNVMe SSD · value storage
Application-managed refresh / projections from: Database or object store + application refresh workers

Strongest evaluation fit: Large, rebuildable values; an expensive miss path; and enough retained data for capacity economics to matter.

Design decisions that determine the outcome

01

Keep cache semantics explicit

Define cache-aside reads, expiry, invalidation, and the stale-value policy in the application. Use versioned keys when a schema or rendering revision changes. Coalesce concurrent misses and bound origin retries so a flush or expiry wave cannot amplify an outage.

02

Budget fan-out and response size

A page that performs multiple serial lookups has less time available per lookup. Compare bounded MGET batches with your current client behavior, including missing-key handling. Cap response sizes and keep origin time separate from store service time.

03

Size keys as well as values

Track key count, average key length, value-size percentiles, TTL distribution, memory reservations, and usable SSD headroom. Tiny objects can remain dominated by index and runtime memory; increasing the number of keys is not free.

A command example executed on Lavik

Docker check passed

A functional check using example data, an isolated instance, and actual replies. It verifies the command sequence shown; it is not a performance or end-to-end correctness test of the industry workload.

Inspect actual requests and replies
> SET catalog:v3:sku42 "{\"name\":\"Trail shoe\",\"version\":3}" EX 300
"OK"

> GET catalog:v3:sku42
"{\"name\":\"Trail shoe\",\"version\":3}"

> MGET catalog:v3:sku42 catalog:v3:missing
["{\"name\":\"Trail shoe\",\"version\":3}",null]

> DEL catalog:v3:sku42
1

> GET catalog:v3:sku42
null
Version and verification scope

lavik 0.1.0-beta.1 · Minimal package · aarch64 · 2026-09-21

Offline container with a read-only root, temporary data, and a reset between scenarios. Examples use an authenticated local connection. TTL ranges and exact arguments are preserved in the execution receipt.

Execution receipt
Start a local instance

What should decide the migration?

Write down the application budgets before replaying traffic. Validate these criteria in your own system; published benchmarks are a starting point.

Long-tail reads

Replay the same key trace at the retained dataset size; include low-locality and post-restart access.

Accept when

Application p99/p99.9, timeout rate, and origin QPS stay within the agreed budgets.

Expiry and refill waves

Exercise your real TTL mix, invalidation bursts, and concurrent refill traffic.

Accept when

Hit rate recovers without saturating the origin or exhausting client retry budgets.

Capacity at target load

Measure resident memory, device occupancy, write traffic, and cost while growing retained objects.

Accept when

Compare complete deployments at the same latency target and retained dataset, with recovery headroom.

Lavik 0.1.0 is a beta. The published GET/SET tests do not establish your hit ratio, eviction policy, multi-region availability, or an application SLA. Verify the exact client and failure behavior before changing the production cache.

Translate business scale into capacity

Value payload ≈ retained objects × average serialized bytes × live cache versions

20×

lower value-capacity cost

When DRAM costs 20 times as much per GiB as NVMe SSD, the same value payload costs one twentieth as much for media capacity: 95% less. Include index memory, CPU, replicas, storage amplification, and recovery headroom in the complete deployment.

Calculate with your capacity prices