WORKLOAD PATTERN

Retain the context. Reconsider the memory cost.

For applications whose Redis session and profile payload grows with users, devices, tenants, and retention. Separate cheap-to-rebuild context from security-critical session authority, and size each path deliberately.

v0.1.0-beta.1Redis / ValkeyNVMe SSD

Why capacity and latency collide

Daily active users do not describe the retained dataset. Mobile devices reconnect, users keep multiple sessions, and profile documents accumulate preferences and application state. Extending retention can grow stored bytes without a corresponding increase in peak QPS.

In-memory capacity makes this retained context expensive. With disk-backed alternatives, a reconnect storm can move cold profiles directly onto the critical request path. The relevant metric is the login or resume experience at the tail, including backend fallback and retries.

DESIGN FOR THIS DATA PATH

Where Lavik fits

Lavik is a candidate for larger, reconstructable session context and user-profile values. Preserve application-managed TTL and deletion semantics and retain an authoritative identity/profile system. Use the NVMe SSD capacity advantage where payload retention drives the bill, then separately qualify availability and revocation behavior.

REQUEST PATHApplication session / profile serviceRedis-compatible client
LavikDRAM · key indexNVMe SSD · value storage
Application-managed refresh / projections from: Identity and profile systems + application refresh

Strongest evaluation fit: Substantial retained user-context payload with an existing authoritative source and a bounded reconstruction path.

Design decisions that determine the outcome

01

Separate context from authentication authority

Decide which fields can be rebuilt or served stale and which must be rejected when unavailable. A missing cached preference can fall back to a profile service; a missing or stale revocation record must follow the authentication design's explicit failure policy.

02

Keep expiry and logout testable

Distinguish absolute expiry from sliding inactivity expiry. Exercise the exact SET options used for refresh, explicit DEL on logout, and concurrent device updates. Storage-level TTL alone does not implement your full session lifecycle.

03

Avoid turning profiles into hot locks

Bound record size and update granularity; isolate tenant and schema identifiers in keys. Keep large context updates from sharing a single contended key with tiny critical counters. Measure index memory when the dataset contains many short-lived, small sessions.

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 context:tenant1:session42 "{\"user\":\"demo42\",\"theme\":\"dark\"}" EX 900
"OK"

> GET context:tenant1:session42
"{\"user\":\"demo42\",\"theme\":\"dark\"}"

> TTL context:tenant1:session42
900

> DEL context:tenant1:session42
1

> GET context:tenant1:session42
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.

Resume storms

Replay returning-user access after idle periods, deployment restarts, and regional traffic shifts.

Accept when

Login/resume p99 and timeout rates meet the application target without overloading the authority service.

Expiry and revocation races

Test expiry, refresh, logout, and concurrent reads using the real session library.

Accept when

No request is authorized by stale or missing state contrary to the defined authentication policy.

Failure and reconstruction

Exercise timeouts, connection loss, restart, and restoration from the authoritative source.

Accept when

Recovery and fail-closed/fallback behavior are explicitly accepted before storing authoritative sessions.

The local TTL/delete example is not a security, replication, or failover certification. Small tokens with little value payload may offer much less capacity saving than larger profile records.

Translate business scale into capacity

Value payload ≈ retained sessions × context bytes + retained profiles × profile bytes

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