An enterprise server quote rising from RMB 400 million to 1.6 billion, the shift in a twenty-year hardware cost premise, and how five storage-engine iterations from 2021 to 2026 led to rebuilding the in-memory storage kernel atop Valkey 8.1.
Earlier this year, the head of infrastructure at a large enterprise reviewed two procurement figures from successive budget cycles: the exact same server bill of materials—budgeted the prior year at RMB 400 million—had returned from hardware vendors quoted at RMB 1.6 billion (the organization remains anonymized under confidentiality). The engineering question on the table was structural: when datacenter memory and storage reprice severalfold within a single procurement cycle, what architectural options hold up across hundred-to-thousand-node stateful fleets without destabilizing production applications?
That question mirrors the five-year engineering trajectory that shaped Engula. Between 2021 and 2026, our team built and deliberately discontinued four storage architectures—cloud-native LSM trees, a Rust Bw-Tree + Raft distributed store, a shared-nothing multithreaded engine, and a semi-managed cloud control plane—before converging on below-protocol in-memory kernel engineering atop Valkey 8.1 (for the architectural specification of Engula 2.3.0, see Architecture of an Enterprise Redis-Compatible Kernel: Protocol Contract, Memory Redesign, and the Five-Tier Quality Hierarchy).
Architecture figure
For roughly two decades, systems engineers designed infrastructure software around a reliable economic premise: DRAM and flash cost per gigabyte declined steadily across hardware generations, making it rational to spend extra pointers, object headers, and allocator slack in exchange for implementation simplicity and single-core speed.
The object layout introduced by Redis in 2009 reflected those economics cleanly. When an instance held a few gigabytes of cache state, allocating a standalone hash-chain node, a 16-byte object wrapper, and a separate string buffer per key—and calling fork so OS copy-on-write page tables handled point-in-time snapshots—kept the codebase compact and fast. As self-hosted enterprise fleets scaled to hundreds or thousands of high-memory servers, however, two structural cost factors compounded:
1:1 to 3:1, routinely accounting for more than 10% of total infrastructure hardware capital and colocation spend.used_memory_rss) went to per-key index pointers, object headers, jemalloc size-class rounding, long-run variable-size page retention, and the 30%–45% free RAM buffer reserved to survive BGSAVE fork copy-on-write spikes without triggering the OOM killer.While server DRAM sat at cyclical price troughs prior to 2024, organizations absorbed that 2× hardware footprint. Between 2024 and 2026, AI infrastructure supply chains altered server economics across every major component:
memory.net), a standard 64 GB server DDR5-5600 ECC RDIMM moved from $258 in mid-2024 and $314 in May 2025 to $2,808 by summer 2026, while regional wholesale channels rose more than 6× to 9×.30 TB enterprise SSD rose from $3,460 in mid-2025 to $22,600 in August 2026 (6.5×). Combined with server CPU price adjustments and extended lead times, enterprise procurement quotes for standard 64-core / 512 GB dual-socket x86 servers rose 2.6× (and matched ARM64 enterprise servers rose 3×) within twelve months.60% of DRAM wafer capacity has shifted toward server and high-margin HBM stacks for AI accelerators (consuming more than three times the wafer area per gigabyte of standard DDR5), while greenfield DRAM fabs require 2.5 to 3.5 years from construction to volume yield—at the exact time AI online feature stores, embedding caches, and real-time session state are expanding in-memory footprints.Founded in 2021 by six to eight systems engineers who had worked together on distributed storage at PingCAP during the early development of TiKV, our team evaluated and shut down four distinct storage directions before committing exclusively to our fifth architecture:
| Stage & Period | Architecture Built | Core Engineering Hypothesis | Empirical Reason for Stopping or Converging |
|---|---|---|---|
| Iteration 1 (2021) | Open-source cloud-native LSM-tree storage engine | Rebuild cloud-disaggregated storage from first principles | As venture markets contracted sharply in 2022, an unmonetized bottom-layer open-source engine faced an unsustainable commercialization horizon |
| Iteration 2 (2022) | Distributed KV store in Rust (Bw-Tree + Raft) |
Combine lock-free Bw-Tree indexing with Raft consensus |
Candid internal review showed a multi-year gap to production maturity without a generational advantage over the established TiKV ecosystem |
| Iteration 3 (2022–2023) | Shared-nothing multithreaded in-memory engine | Maximize single-node QPS into the multi-million tier to cut node count | Field telemetry across large fleets showed CPU utilization sitting at 10%–20% year-round while 70% RAM watermarks drove hardware expansion; altering single-threaded execution also risked subtle MULTI/EXEC, WATCH, and Lua incompatibilities |
| Iteration 4 (H1 2023) | Semi-managed cache control plane on public cloud | Trim operational overhead and cloud spend via orchestration | Public-cloud cache spend represented too small a slice of total compute/GPU budgets to justify migration; acute hardware cost concentrated in 100-to-10,000-node self-hosted fleets |
| Iteration 5 (Aug 2023 – Present) | Engula 1.0 → Engula 2.0–2.3.0(Preserve the protocol contract, rebuild the storage kernel) |
Trade idle multi-core CPU headroom to halve physical DRAM in drop-in self-hosted deployments | 1.0 validated ~30% value-compression savings and binary drop-in adoption; Engula 2.0–2.3.0 reworked the storage kernel around compact indexing, stackful coroutines, and physical block RDB snapshots, and added formal verification for core C modules atop Valkey 8.1 |
Iteration 3 provided the decisive empirical correction. Although the shared-nothing multithreaded engine produced high synthetic QPS numbers, fleet operators running thousands of cache nodes pointed consistently to the same telemetry: modern 64-to-128-core hosts left 80%+ of CPU capacity idle while scaling out strictly on physical DRAM watermarks. Moreover, enterprises running thousands of microservices could not absorb the semantic audit burden of non-standard multithreaded transaction and Lua models.
In August 2023, we extracted the value-compression pipeline into a single-threaded drop-in binary (Engula 1.0) leaving hash tables and object headers intact, and validated it with more than seven large self-hosted engineering organizations across social media, insurance, recruitment, video, and online travel. A major social platform validated roughly 30% memory reduction in its large-scale test environment, confirming both binary drop-in viability and the three structural ceilings of value-only compression: untouched per-key metadata floors, background OS thread latency contention, and BGSAVE copy-on-write amplification.
Valkey 8.1: From Prototype to Auditable Enterprise KernelFollowing late-2024 prototyping, on April 1, 2025 we initialized a clean-slate repository atop Linux Foundation's Valkey 8.1, redesigning the index, compact-record allocator, coroutine scheduler, and physical RDB engine across four releases through Engula 2.3.0 (see the Engula Release Notes).
Following the March 2024 license split, Linux Foundation's Valkey—governed by a multi-vendor Technical Steering Committee under a permanent 3-Clause BSD license—secured the open-source mainline. Engula maintains a clean two-layer architectural boundary: preserving full upper-layer compatibility with Redis 7.2 and Valkey 7.2 alongside continuous forward support for higher Valkey releases (wire protocol, threaded network I/O, replication state machines, 16,384-slot Cluster, Sentinel, Lua, ACLs, TLS, and upstream security patches) while thoroughly re-engineering the storage, coroutine compaction, and physical snapshot kernel beneath the hash slot.
Rather than diverging from the open-source ecosystem, Engula operates as an enterprise database kernel aligned long-term with Valkey: Engula 2.3.0 integrates the Valkey community's 512 B-leaf sorted-set B+ tree (valkey-io/valkey#4359, BSD-3) directly from upstream, and contributed three merged pull requests (#4637, #4644, #4645) back to valkey-io/valkey after uncovering six edge-case regressions via dual-encoding differential fuzzing.
Because the storage engine is distributed commercially as a closed-source binary, institutional adoption relies on independently verifiable engineering evidence:
RSS reductions and explicit negative boundaries: Across eight anonymized production RDB audits (9 GB to 17.9 TB), total physical RSS dropped from 35.07 TB to 18.57 TB (41.79%–75.11% per cluster before BGSAVE CoW savings), alongside candid publication of non-benefiting workloads (<= 64 B strings, incompressible random bytes) and our 13-round benchmark calibration record.24/7 conservation monitoring: Using Frama-C 33.0 (WP + EVA), Alt-Ergo 2.4.3, and CBMC 6.8.0 directly on our C source, we discharged core-index structural & lookup invariants (0 admit), 0 runtime UB alarms, and bit-exact varint/UUID bijections (see Formal Verification), backed by a 14-domain, 144/146-scenario fault and Redis 7.2 interop matrix (5.55 s vs. 5.50 s Sentinel RTO) and 24/7 conservation soak runs.55% to 31%), leading financial institutions have advanced from passive DR replicas into budgeted multi-wave production deployments.ValueSight, code-proof) verify memory, 99.40% (4,290/4,316) runtest compatibility, and live Redis 7.2 failback inside air-gapped networks.Every subsystem inside Engula obeys one unidirectional priority order: Protocol Compatibility > Data Integrity & Verifiable Recovery > Predictable Tail Latency > Physical Memory Reduction (used_memory_rss) > Single-Core Peak Throughput. Where self-hosted fleets pair underutilized multi-core CPUs with memory-bound server footprints, rebuilding the storage layer beneath an unchanged protocol contract halves hardware requirements while preserving a live five-minute replication failback to upstream Valkey or Redis 7.2.
Whether that exchange fits a specific cluster is an empirical question answered in five minutes by running ValueSight offline against an authorized dump.rdb snapshot.