Modeled: From 300 Redis Nodes to 3 Lavik VMs
A modeled 92.4% reduction in monthly VM costs for roughly 2.4 TB of retained data, with read-heavy demand below about 1M ops/s and two data copies per side.
A modeled 92.4% reduction in monthly VM costs for roughly 2.4 TB of retained data, with read-heavy demand below about 1M ops/s and two data copies per side.

For an application retaining about 2.4 TB of data, with read-heavy demand below roughly 1M operations per second and two data copies on each side, the modeled opportunity is striking: replace 300 small Redis VMs with three Lavik VMs and reduce the monthly VM bill by 92.4%. When memory fills before CPU, NVMe-backed values let you keep more state without buying more servers just for RAM.[1][15][8]
A human-facing application might retain a profile, a session and a set of features per user. An agent application can retain all of these for a research assistant, a coding assistant and multiple background workers acting on that user’s behalf. Each agent accumulates execution state, observations and working context. An agent that runs occasionally may still need its state immediately when it resumes. Capacity grows with the number of agents, the size of their state and how long it remains useful; request volume does not have to grow at the same rate.[1]
At one billion agents, just 1 KB of features each produces approximately 1 TB of values. Increase that to 10 KB and the dataset reaches 10 TB; at 100 KB, it reaches 100 TB, before keys, indexes or replication. Applications still need low-latency reads and updates through familiar Redis clients and data structures. Keeping every retained value in expensive DRAM makes that combination harder to afford. Lavik is designed to make NVMe SSD capacity practical for those latency-sensitive workloads.[1][8]
| Bytes per agent | Unique value payload | Two copies, values only |
|---|---|---|
| 1 KB | 1 TB | 2 TB |
| 10 KB | 10 TB | 20 TB |
| 100 KB | 100 TB | 200 TB |
Start with a finely sharded Redis fleet: 300 Standard_E2s_v4 Azure VMs, each with two vCPUs, 16 GiB RAM and no local SSD, split into 150 primaries and 150 replicas. The fleet provides 600 vCPUs and 4,800 GiB RAM overall, with 2,400 GiB of primary RAM—about 2.577 decimal TB before overhead. For the roughly 2.4 TB retained-data target, sizing also needs room for keys, indexes and operating headroom.[1][23]
Using Azure Southeast Asia (Singapore), Linux pay-as-you-go rates in US dollars, the monthly VM bill is $33,288 for Redis and $2,514.12 for Lavik. Microsoft retail rates checked on November 7, 2026 are $0.152 per hour for Standard_E2s_v4 and $1.646 for Standard_L16as_v4, with 730 hours per month. The Lavik deployment uses two L16as_v4 data VMs and one E2s_v4 Meta-only voter. Each data VM includes 16 vCPUs, 128 GiB RAM and 3.84 TB local NVMe.[3][23][24][1]
Larger Redis instances reduce the node count, but they do not change the cost of the RAM you need. At the same total RAM capacity, these E-series sizes have the same VM bill. For example, 40 E16s_v4 VMs with 128 GiB each, or 20 E32s_v4 VMs with 256 GiB each, provide 2,560 GiB of primary RAM with one replica per primary. Both cost $12,917.44 per TB-month, exactly the same as the small-VM fleet. Choosing small or large Redis instances changes the layout; moving values from RAM to NVMe changes the economics.[1][3][23]
| Redis VMs | Primary RAM | USD / month | USD / TB-month |
|---|---|---|---|
| 300 × E2s_v4 | 2,400 GiB | $33,288.00 | $12,917.44 |
| 40 × E16s_v4 | 2,560 GiB | $35,507.20 | $12,917.44 |
| 20 × E32s_v4 | 2,560 GiB | $35,507.20 | $12,917.44 |
The modeled monthly VM saving is $30,773.88—92.4%—or $369,286.56 annualized. The three Lavik VMs total 34 vCPUs and 272 GiB RAM: two data-sized machines and a smaller control-plane voter. The comparison covers VM charges; disks, backups, traffic, operations, support and taxes are budgeted separately.[1][3][13]
| Deployment | USD / VM-hour | Monthly USD | Annual USD |
|---|---|---|---|
| Redis · 300 × E2s_v4 | $0.152 | $33,288.00 | $399,456.00 |
| Lavik · 2 × L16as_v4 + 1 × E2s_v4 | $1.646; $0.152 | $2,514.12 | $30,169.44 |
The proposed Lavik topology uses one primary and one full follower on separate Standard_L16as_v4 VMs. Each has four 960 GB local NVMe devices, totaling 3.84 TB, and runs one Data process plus one Meta member. A Standard_E2s_v4 VM runs the third Meta member. The result is two complete dataset copies and three Meta voters; the third VM is a control-plane participant, not a third dataset copy or another serving primary.[1][23][24][13][9]
Count capacity once when comparing the complete deployment bill. Lavik provides 3.84 TB of raw NVMe capacity at $654.72 per TB-month, including its follower and voter. Redis provides 2,400 GiB of primary RAM, or 2.577 decimal TB, at $12,917.44 per TB-month including replicas. Both figures are before database overhead and free-space reserves. The cost gap comes from the storage medium: RAM versus included NVMe capacity.[1][3][23][24]
| Deployment | Single-copy capacity denominator | USD / TB-month |
|---|---|---|
| Redis · 300 × E2s_v4 | 2,400 GiB RAM (≈ 2.577 TB) | $12,917.44 |
| Lavik · 2 × L16as_v4 + 1 × E2s_v4 | 3.84 TB NVMe SSD | $654.72 |
Lavik uses DRAM for key indexes, metadata and active buffers, while values use NVMe capacity. RAM sizing accounts for key count and key lengths, routing metadata, buffers, hugepages and replication backlog. In the billion-key experiment, a nominal 128 GiB server holds 1.024 TB of logical value payload, excluding keys and storage overhead—showing how retained data can grow well beyond RAM.[11][15][1]
SPDK makes the storage path explicit. Lavik submits NVMe operations through userspace queue pairs and polls for completions, removing the kernel block-I/O submission path and its syscall and wakeup overhead. Asynchronous requests keep storage work in flight while workers make progress on other commands. Polling trades CPU time for prompt completion handling; queue depth, completion batching and CPU placement determine how effectively that time is used. Modern NVMe devices supply the parallel queues and internal concurrency. The engine must deliver enough independent work to exploit them.[6][7][15]
Lavik’s Bycorf workers use coroutines, owner-local mutable state and explicit dispatch between workers. While one command waits for storage, other runnable work can proceed. Ownership keeps common operations close to the state they modify and reduces coordination between cores. That matters at a million operations per second: small amounts of scheduling, synchronization or allocation overhead accumulate into substantial CPU demand. Designing execution and storage together lets Lavik use SSD parallelism without turning every I/O into a stalled request-processing thread.[8][10][11]
The optimizations extend through the request path. Eligible disk GETs can use an admitted index snapshot on the connection worker, avoiding owner dispatch when the fast path applies. Parsing handles batches of up to 128 commands, and small pipeline replies can coalesce into 64 KiB writes. Per-worker append streams avoid a staging-buffer allocation for every logical slot. Together, these choices reduce coordination, system calls and buffer overhead. The Redis-compatible interface stays familiar to applications; the implementation underneath is built around efficient concurrent storage access.[10][11]
Lavik 0.2.0 supports grouped storage for Strings, Hashes, Sets, Lists, Sorted Sets and Streams. Large Strings use 8 KiB segments, while collections use independently addressed groups. Focused operations can work on the relevant portions instead of materializing or rewriting an entire large object. This matters when an agent profile combines frequently updated features with much larger retained state: I/O scheduling and the bytes touched by each command both affect the request path.[12]
The October 21 benchmark compares Lavik 0.2.0 SPDK, Redis 8.10.2 and Valkey 9.1.2 on the same 16-vCPU Azure server. A separate load generator issues uniform-random GETs or overwriting SETs over private networking, using 1 KiB values and pipeline depth one. Redis and Valkey keep values in DRAM; Lavik uses NVMe. The results below pair throughput with client-observed latency; the benchmark configuration is recorded in the notes.[15]
At 1,280 connections and 10M keys, Lavik delivers 1,156,956 GET QPS and 945,384 SET QPS. At that same concurrency, GET throughput is 18.5% above Redis and 26.6% above Valkey; SET is 9.4% above Redis. Lavik GET p99 is 3.999 ms and p99.9 is 7.103 ms; SET p99.9 is 10.175 ms. The table keeps measured latency alongside throughput.[2][15]
| System / operation | QPS | Average | P50 | P95 | P99 | P99.9 |
|---|---|---|---|---|---|---|
| Lavik 0.2.0 SPDK GET | 1,156,956 | 1.106 | 1.023 | 1.495 | 3.999 | 7.103 |
| Lavik 0.2.0 SPDK SET | 945,384 | 1.353 | 1.143 | 2.719 | 4.447 | 10.175 |
| Redis 8.10.2 GET | 976,087 | 1.311 | 1.119 | 2.703 | 4.383 | 7.039 |
| Redis 8.10.2 SET | 863,860 | 1.481 | 1.295 | 2.751 | 4.191 | 7.391 |
| Valkey 9.1.2 GET | 913,756 | 1.400 | 1.191 | 2.639 | 4.383 | 7.743 |
| Valkey 9.1.2 SET | 793,809 | 1.612 | 1.511 | 2.543 | 3.775 | 7.743 |
The billion-key run offers a different operating point: at 320 connections it delivers 652,881 GET QPS at 0.943 ms p99.9. At 1,280 connections it reaches 1,129,597 GET QPS at 4.015 ms p99.9. This is a throughput/latency tradeoff, not a promise of sub-millisecond latency at the peak. Its client uses 32 threads and 60-second windows, compared with 16 threads and 30-second windows for the 10M-key comparison.[15][2]
The billion-key dataset contains 1.024 TB of logical values, about 7.5 times the nominal 128 GiB of RAM, before keys and other overhead. The separate 2-vCPU 0.2.0 experiment retains 100M keys with 95.37 GiB of logical values on a nominal 16 GiB host. Its peak GET and SET rates are 215,644 and 231,361 ops/s. The smaller 1M-key dataset peaks at 215,640 GET and 239,405 SET ops/s. These workload-specific results support testing storage-backed capacity; they do not establish arbitrary application latency or proportional scaling across fleet sizes.[15][2]
The 0.2.0 io_uring YCSB experiment also measures changing structured records. Lavik achieves 476,454 total ops/s for a 50/50 read/update mix and 488,622 for a 95/5 mix, using HGETALL reads and LAVIK.HREPLACE updates against 100M records of ten 128-byte fields. These separate 300-second, 256-worker, unreplicated runs are below one million ops/s; GET throughput must not be reused as mixed-workload capacity. The table includes the operation-specific p99.9 values.[16][2]
| Lavik workload | Total QPS | READ P99.9 ms | UPDATE P99.9 ms |
|---|---|---|---|
| 50% HGETALL / 50% HREPLACE | 476,454 | 4.399 | 2.179 |
| 95% HGETALL / 5% HREPLACE | 488,622 | 1.902 | 1.716 |
Plan this three-VM configuration for read-heavy demand below about 1M ops/s. Above that level, add serving capacity and reprice the topology. Write-heavy workloads, expensive commands, stricter tail latency, replication and burst headroom can call for more hosts sooner. Size serving capacity for the primary’s workload, with the follower maintaining the second data copy.[1][15][16][9]
Node count changes cluster machinery as well as the VM bill. Redis Cluster distributes 16,384 hash slots and uses a full-mesh cluster bus. The specification describes N−1 outgoing and N−1 incoming bus connections per node, or N(N−1) initiated connections cluster-wide: 89,700 for 300 nodes, 1,560 for 40, and 380 for 20. These are bus connections, separate from application traffic. Larger Redis VMs reduce this coordination overhead; storage-dense Lavik reduces the capacity-driven fleet further.[4][1]
The cluster uses gossip, heartbeat probes and failure reports to maintain membership and health. Local failure suspicion must be reconciled with reports from other nodes; failover requires authorization and configuration epochs. During a network partition or rolling restart, engineers must understand which primaries, replicas and paths remain reachable. More members create more placements and relationships to diagnose, even when request-processing capacity is sufficient. The operating cost of a fleet includes this work as well as the VM bill.[4]
Resharding adds data movement, ownership changes and client redirects. Maintenance adds patching, restarts, monitoring and replica placement. A storage-dense Lavik deployment reduces the number of Data processes needed for capacity and gives each one room to grow. Lavik’s Meta service manages topology and authority, while native replication maintains followers. For a capacity-bound application, reducing the fleet addresses two expenses at once: the servers purchased for memory and the operational work that comes with managing them.[5][8][13][9]
The strongest candidate is capacity-bound: retained state forces expansion while CPU utilization and traffic remain below the fleet’s serving capacity. Size the deployment around actual commands, key count, value sizes, replication, latency targets and busiest periods. As traffic grows, add Data nodes to match demand while keeping the capacity advantage of NVMe.[1][8][15]
Both sides retain two data copies, but copy count is not a service-level guarantee. Lavik Data replication is asynchronous, Azure local NVMe is temporary storage, and Meta state needs durable disks. External backups remain part of the deployment budget.[1][24][13][9]
Use RedisShake to move from the existing Redis deployment. Inventory commands and key shapes, create the managed Lavik target, copy the baseline and follow incremental changes. Reconcile key counts, values and expirations before cutover. Pause source writes for the final catch-up, switch clients, and keep a rollback procedure that accounts for new writes. The source shard count does not have to dictate the target’s physical layout. The linked migration guide provides release-pinned configuration and steps for turning the consolidation design into an executable migration.[14]
Lavik combines a Redis-compatible interface, NVMe key-value storage, efficient grouped storage and an Apache 2.0 license. For capacity-bound applications, the opportunity is straightforward: retain more useful state, spend less on RAM, and run fewer servers. Start with a representative dataset and your latency budget, size compute and replication for the workload, and give agent state room to grow.[8][12][15][1]
Benchmark setup: Azure Standard_L16aos_v4, Japan East zone 2, AMD EPYC 9V74, 16 logical CPUs on eight physical cores, nominal 128 GiB RAM, and six 1.92 TB NVMe devices. All values are 1 KiB. The 10M-key comparison uses 16 client threads and one 30-second window per point; the 1B-key run uses 32 client threads, independent client seeds and one 60-second window. These single-server tests use kernel TCP, private accelerated networking, SPDK and no Data replicas; Redis AOF and scheduled snapshots are disabled. Selected Redis I/O threads are 16 for GET/SET; Valkey uses 16 for GET and eight for SET. This benchmark configuration differs from the Singapore cost model’s L16as_v4 hardware and replicated topology; the cost model is capacity-based, with application throughput sized separately.[15]
Measurement details: percentiles come from complete windows, not averages of interval percentiles. P95 in the peak table is decoded from the embedded HDR histogram; sample counts and P50/P99/P99.9 are checked against raw JSON. Each point is one observed run, with no confidence interval. The separate mixed-workload experiment uses io_uring, 12 Lavik workers plus four system/IRQ CPUs, 256 client workers, 300-second windows and no replicas.[2][15][16]
Cost basis: Singapore Linux pay-as-you-go, 730 hours/month and 12 monthly periods/year. Capacity-normalized costs count one logical copy while including all replica and voter VM charges, before database overhead and headroom. The 40-node and 20-node Redis examples round up to 2,560 GiB of primary RAM, versus 2,400 GiB for the 300-node example; this adds 6.7% capacity and cost, while cost per TB stays the same. The capacity chart shows Redis alternatives at 16, 128 and 256 GiB per VM and repeats independent Lavik units of two data VMs plus one voter for raw capacity growth. It illustrates capacity, with throughput sized separately. All figures exclude disks, backups, traffic, staffing, support, tax and negotiated discounts.[1][3][23][24]
Texto de lavik.dev tal como lo publicó, leído de su página y mostrado aquí con el formato de El Autómata. El original, en lavik.dev · Volver a la noticia de El Autómata