Skip to main content
Hendoi

We Benchmarked Redis Against a Custom C++ Storage Engine — The Results Were Not Close

8 min read

This post is for senior engineers, architects, and technical CTOs in the US and Europe who want to see real numbers. We ran Redis and a purpose-built C++ storage engine on the same hardware, with the same data volume and query mix. The goal was not to bash Redis—it is an excellent general-purpose cache—but to show why a custom engine built for one workload wins on every metric that matters when that workload is all you care about.

  • Hardware: Single node, 8 vCPU, 32 GB RAM (representative of a typical cache node).
  • Data: 10 million keys, value size 200–500 bytes (simulating session-like payloads).
  • Operations: 80% read, 20% write; key access pattern roughly Zipfian (hot keys).
  • Both systems: no persistence for this test (apples to apples on in-memory behaviour).

Average read latency (p50) Redis: 0.6–1.2 ms. Custom engine: 0.05–0.15 ms. The custom engine has no generic command parsing, no unnecessary data structures—just a hash map and memory layout tuned to our key/value shape. Cache-line alignment and a custom allocator remove allocation churn.

Write throughput (ops/sec) Redis: ~500K–700K. Custom engine: ~1.2M–1.8M. We use lock-free structures and a minimal binary protocol. No Redis command overhead, no single-threaded event loop bottleneck for this workload.

Memory efficiency Redis: ~2–3× the raw data size (overhead for metadata, internal structures). Custom engine: ~1.1–1.2× (we allocate only what the schema needs). For 10M keys that is the difference between ~24 GB and ~10 GB for the same logical data.

P99 latency under load Redis: 2–5 ms. Custom engine: 0.2–0.5 ms. Predictable latency under load matters for user-facing and trading systems. The custom engine avoids GC-like pauses and lock contention by design.

Redis is built for many use cases: strings, hashes, lists, sets, sorted sets, pub/sub, Lua. Your use case might need only "get/set by key with TTL." Every extra feature is code path and memory you pay for. Our engine has one job: serve this key-value shape with this eviction policy. No generic overhead, no unnecessary instructions. We also control memory layout (cache-line friendly, pre-allocated pools), so CPU cache misses drop and latency stays flat as load increases.

If you need multiple data structures, replication, persistence, or a managed service with minimal ops, Redis is a great choice. The benchmark is not "Redis is bad"—it is "for a single, well-defined workload, a custom engine can be an order of magnitude faster and cheaper."

If you have a hot path that looks like this (high read/write, specific schema, latency-sensitive), we can run a similar benchmark for your workload or design an engine for your schema. Contact us for a free architecture audit.

Hendoi builds custom database engines (VeloxDB) in C++ for USA, Canada, UK, and Bengaluru. Same rigour. Your workload.

Frequently asked questions

Yes. We can take an anonymized description of your data shape and access pattern and run a comparable benchmark or provide a design and quote.

Yes. We implement write-ahead log (WAL) and optional snapshots for use cases that cannot afford data loss on restart.

We ship client SDKs in Python, Node.js, Java, and Go. The engine speaks a binary protocol; the SDK hides the details. 📞 +91-9677261485 | 📧 support@hendoi.in | [Contact us](/contact)

Showing slide 1 of 6. Use the buttons below to change slide.

Need web app, mobile app, or desktop app development? We serve USA, Canada, and Bengaluru. React Native, Flutter, MCP servers, AI chatbots, SDKs, APIs. Explore our services and blog for more.

Book a Free Consultation