Hey everyone! ![]()
I’m excited to share VortexKV, an ultra-high performance in-memory key-value cache engine written in 100% pure Go (zero CGO dependencies).
For years, the consensus in high-throughput systems engineering has been that to achieve multi-million ops/sec with sub-millisecond latencies, you had to turn to C, C++, or Rust to avoid runtime garbage collection pauses. We built VortexKV to test the boundaries of pure Go.
Benchmark Highlights (Local commodity hardware)
- 6.87 Million ops/sec sustained pipelined throughput
- <180μs p99 latency under heavy multi-client concurrent load
- Zero GC spikes: 0 B/op allocations on hot read/write paths
How It Works Under the Hood
- Pinned Reactor Goroutines (
runtime.LockOSThread): Dedicated network worker goroutines are locked to dedicated OS threads and CPU cores to eliminate OS scheduler thread migration and context switching latency. - Cyclic Ring Buffers & Batched Coalescing: Each TCP client connection receives preallocated circular buffers. Socket write calls are coalesced into batches (up to 128 responses per syscall), cutting kernel transitions drastically.
- 256-Shard Lock Striping: Keys are hashed across 256 independent partitions with 64-byte cacheline padding to prevent false sharing across CPU cores.
- Custom Memory Arena Allocator: Memory allocations bypass the standard Go heap allocator on hot paths, starving the garbage collector and maintaining predictable low p99 latencies.
- Full Redis Protocol (RESP2) Compatibility: Drop-in compatible with standard Redis tools and clients (
redis-cli,go-redis,ioredis, Jedis). - Sub-millisecond AOF Persistence & Real-time Web Studio Dashboard: Embedded on port 7380 for real-time monitoring, visual latency histograms, and keyspace browsing.
Quick Start
Docker (6.4 MB scratch container, 0 CVEs):
docker run -d -p 7379:7379 -p 7380:7380 ianshugarg/vortexkv:latest
Connect with standard redis-cli:
redis-cli -p 7379 PING
# PONG
GitHub Repository: GitHub - GargAnshu9468/vortexkv: The fastest pure Go in-memory Redis alternative. 6.87M+ ops/s peak throughput, 119µs latency, Multi-Reactor engine, embedded Cyberpunk Web Studio GUI, native HNSW AI vector search, Redis Streams, cluster gossip, Lua 5.1 & Wasm runtimes, and K8s operator. 100% pure Go, zero CGO. · GitHub
Technical Architecture Deep-Dive: https://medium.com/@garganshu/how-we-built-the-fastest-in-memory-key-value-store-in-pure-go-hitting-6-87m-ops-sec-without-cgo-600b4dba141f
I would love to get your feedback, architectural critiques, and benchmarking tips from the Go community!