Engula is a high-performance, memory-efficient database fully compatible with Redis. It is built upon the Redis Server codebase, replacing Redis’s in-memory object storage module with the Engula memory engine while maintaining full protocol compatibility. This design enables effortless migration from existing Redis deployments.
Engula’s architecture is guided by three fundamental principles:
Engula Server builds upon the Redis Server architecture. The primary modification involves replacing the in-memory object storage module with the Engula memory engine. Other Redis modules require only minor adaptations, preserving compatibility across all Redis functionalities.
In Redis Server, data access revolves around the Redis Object (robj). Within Engula Server, in-memory data is represented as an Engula Object (eobj), a more compact structure specifically optimized for compression and decompression efficiency.
During key-value operations, Engula Objects are dynamically converted into temporary Redis Objects through:
robj instances are only created on demandEngula dramatically reduces memory consumption through highly optimized data structures and encoding schemes. In typical scenarios,
| Data Structure | Redis Overhead (Bytes) | Engula Overhead (Bytes) | Optimization |
|---|---|---|---|
| HashTable | 32 (dictEntry) | 14 | Swiss table |
| Key + robj | 3 (key sds) + 16 (robj) | 10 | eobj storage |
| Value (String) | 3 (value sds) | 1 | eobj storage |
| TTL | 8 | 5 | Variable-length integer encoding |
| Jemalloc | ≥ 4 (8-byte alignment) | 2 | Memory Block management |
| Total | 66 | 32 | ~50% memory reduction |
Key-value data in Engula is stored in Memory Blocks, divided into:
Background tasks periodically compress and replace blocks in the Immutable Zone. These tasks are fragmented into small, interruptible coroutines, executed within native Redis main and I/O threads.
Engula dynamically adjusts response-time budgets based on system load and prioritizes foreground operations to meet latency expectations. Background workloads are intelligently distributed across I/O threads according to thread utilization to maximize CPU efficiency.
Engula supports linear horizontal scaling through the addition of I/O threads. System throughput matches or exceeds Redis’s performance, providing predictable, nearly linear CPU scalability.
Redis (Busy Polling Model)
Engula (Adaptive Signal/Wait Model)
pthread condition variablesEngula actively trades minimal CPU overhead for substantial memory savings through real-time data compression and decompression. This approach preserves performance while significantly reducing memory usage.
Engula maintains full wire protocol compatibility with both Redis and Valkey. By integrating native compute layers from these open-source ecosystems, Engula ensures consistent behavior for all standard data manipulation commands.
With a modular design focused on isolated storage integration points, Engula can align with new Redis or Valkey releases within one month, ensuring rapid compatibility updates.
SAVE/LOAD times and accelerates full replication syncEngula represents a major advancement in Redis-compatible databases, combining innovative memory management, aggressive compression, and protocol-level interoperability.
Its adaptive I/O model and horizontally scalable architecture deliver consistent, linear performance while achieving up to 50% memory reduction compared to standard Redis deployments.
Through efficient design and continuous compatibility with Redis and Valkey, Engula offers a compelling platform for organizations seeking to lower memory costs without compromising performance or compatibility.