The shared-nothing databasefor multi-core hardware.
DbSync partitions data and I/O across isolated reactor cores. Zero mutex contention, lock-free SPSC inter-core message passing, and kernel-bypass io_uring for deterministic sub-millisecond predictability.
Engineered without global locks.
Traditional multi-threaded databases waste up to 40% of compute cycles arbitrating mutex contention and cache line invalidation. DbSync partitions both state and I/O strictly per physical core.
Isolated Reactor Cores
Each physical core runs an independent, single-threaded reactor thread with exclusive ownership of its data partition. Global locks, mutex arbitration, and cross-socket cache line bouncing are completely eliminated.
Kernel-Bypass io_uring Rings
Zero syscall overhead per network operation. DbSync submits socket read/write operations into kernel Submission Queues (SQ) and harvests completions from Completion Queues (CQ) using registered buffer rings.
SPSC Lock-Free Message Steering
When a connection on Core A issues a command for a key sharded to Core B, the request hops across dedicated SPSC (Single-Producer Single-Consumer) ring buffers with acquire/release memory semantics in under 150 nanoseconds.
Zero-Copy RESP Parsing
Custom high-speed parser evaluates Redis Serialization Protocol (RESP) commands directly over raw network buffers using std::string_view. No heap allocation, no string copies on hot command execution.
Audited empirical throughput.
Eliminating locks yields dramatic performance dividends as core count scales. Under full workload saturation, DbSync sustains over 2.14 million operations per second on a single machine.
Deploy in seconds.
Run the 28 MB official multi-architecture image or build straight from source with native C++20 flags. Drop-in compatible with standard Redis CLI and client libraries.
docker run -d --name dbsync --network host -p 6379:6379 ayushv1/dbsync:latest
redis-cli -p 6379 PINGSystematic evolution.
The progression from a simple 18 RPS prototype to a 2.14M RPS production engine through methodical hardware alignment and zero-lock architecture.
Initial reference implementation using blocking POSIX sockets and naive RESP string parsing. Validated protocol correctness and baseline execution flow.
Shifted to Linux io_uring submission/completion queue rings. Kernel-space socket polling eliminated per-operation syscall context switching.
Removed all heap allocations from the hot path. Implemented monotonic arena allocators and zero-copy std::string_view parsing over kernel-registered buffers.
Full shared-nothing reactor model. Reactor threads pinned per CPU core communicate across lock-free SPSC ring buffers with zero mutex contention.