: When the volume of data is too large for RAM budgets, KeyDB-Flash allows storage on NVMe SSDs at a fraction of the cost.
: When a client establishes a connection, the engine assigns that socket connection to a specific thread using an accept() load-allocation pattern.
: Unlike Redis, which uses a single thread for network I/O and command execution, KeyDB uses multiple threads to handle these tasks. This allows it to scale vertically as you add more CPU cores.
By utilizing multiple cores, a single KeyDB node can often outperform a single Redis node by a wide margin, sometimes achieving several times higher throughput. Key Advantages of KeyDB Engineering keydb eng
: Because KeyDB fully supports the Redis protocol, modules, and client libraries, it can be integrated into existing stacks without changing application code.
KeyDB uses the SO_REUSEPORT socket option to allow multiple threads to bind and listen on the same port simultaneously. To further optimize for modern NUMA (Non-Uniform Memory Access) architectures, each thread can be pinned to a specific CPU core, and the engine uses the SO_INCOMING_CPU feature to direct incoming network traffic to the appropriate core.
: If you want to reduce your cloud bill by using fewer, larger instances instead of dozens of small ones. : When the volume of data is too
What type of (RAM-heavy servers, NVMe SSDs, cloud block storage) do you have available? What is your target read/write ratio ?
Set vm.overcommit_memory = 1 in /etc/sysctl.conf to allow the kernel to allocate more memory than physically available, preventing allocation failures during heavy write loads.
The result: no cross-thread synchronization for the majority of commands. The only cross-thread communication is for global operations (e.g., FLUSHALL , INFO , cluster state changes). This allows it to scale vertically as you add more CPU cores
October 26, 2023 Subject: KeyDB Engineering Overview To: Engineering Team / Technical Stakeholders
This article dissects KeyDB not as a simple "Redis with threads," but as a sophisticated system of sharded execution, optimistic locking, and memory re-engineering.
KeyDB introduces a :
KeyDB can use disk storage (SSD/NVMe) as an extension of RAM.
KeyDB introduces a "thread-per-core" design. It uses a small, dedicated set of threads for handling networking I/O and another set for executing commands. This allows KeyDB to handle multiple requests concurrently, dramatically improving throughput and reducing latency [3]. 2. Key-Level Locking