Redis
Customer Profile

Redis is the open-source home and commercial provider of Redis, the popular in-memory database. The company’s Redis Enterprise is a real-time data platform used by more than 8,000 organizations worldwide. Redis Enterprise enables developers to accelerate application response time by serving frequently needed data from an in-memory (RAM) cache instead of making calls to a database with network-attached persistent storage. While RAM provides extremely fast read/write speeds that are optimal for applications that require low latency and high performance, it is an expensive resource. Hence, it is used for only the most valuable data

The Challenge

To help customers scale their data more cost-effectively, Redis Enterprise allows for the creation of Redis on Flash (RoF) databases that extend RAM capacity with SSD and persistent memory to store significantly more data with fewer resources and thus reduce costs. Originally, RoF used the RocksDB key-value store as its storage engine. RocksDB is built on a log-structured merge tree (LSM tree) where key/value pairs are arranged in sorted tables (SST). SST files are append-only, which means that they are never updated. Instead, when new or updated data comes in, an additional SST file is created. To reduce disk I/O, multiple SST files are sorted into a single larger SST file in a process called compaction, which allows for faster access and retrieval of data. However, as the number of write operations grows, RocksDB tends to suffer from degraded as well asהunpredictable performance issues due to high write amplification factor (WAF), which refers to the ratio of actual writes to storage compared to writes requested from the database.

According to Redis, users encountered increasing performance as larger portions of the dataset were moved outside of memory to slower flash drives. The additional latency was significant, resulting in user-side stalls when running large datasets. Redis acknowledges that RoF was 5X slower than Redis on memory. As these scenarios became more and more common, Redis started looking for ways to improve the performance of RoF. Initially, Redis tried to configure RocksDB, which proved to be a cumbersome process as there are hundreds of configuration items in RocksDB, all linked in a complex web of interdependencies so any change in one item could impact the others. As this approach was infeasible, Redis tested various hardware-based solutions to pack more memory into the system. However, these solutions were expensive and not scalable enough.

After learning about Speedb’s embedded key-value store, Redis decided to test it as a replacement solution for RocksDB. This was almost a natural choice as the Speedb Data Engine was built as a fully compliant alternative to RocksDB.

"Our main goal is to eliminate user side stalls and achieve overall performance improvement at scale."

The Solution

Designed to address the rising demand for petabyte scaling of datasets while maintaining high performance and low hardware requirements, Speedb breaks through the limitations of existing key-value stores. For example, it features a new compaction method that dramatically reduces write amplification, a flow control redesign to eliminate spikes in user latency and a revolutionary indexing method.

The integration of Speedb was seamless and involved no changes to the code. To replace RocksDB with Speedb, Redis simply changed the link to the library and the transition was done. According to Redis, “it took us literally one minute to integrate Speedb for evaluation.”

The evaluation of Speedb was successful. With Speedb as its key-value data engine, the performance of RoF was significantly boosted so it was only 2X slower than Redis on memory while using less CPU and memory resources. By narrowing down the performance gap from RAM to flash, Redis could now offer its customers the ability to allocate more data to flash and capitalize on cost and scalability benefits.

Yiftach Shoolman, co-founder and CTO of Redis, says that Speedb was instrumental in mitigating the trade-off between performance and scalability. He notes that “our main goal was to eliminate user side stalls and achieve overall performance improvement at scale. Redis in memory users can now scale to RoF with fewer performance hits, while RoF users can gain a huge performance boost. The ability to eliminate I/O stalls with Speedb addresses a major pain point for customers and eliminates a big headache for us.”

Following the successful evaluation, Speedb is now deployed as the key-value data engine that powers RoF. Shoolman adds that in addition to Speedb’s technology capabilities, the company’s “customer-oriented approach, providing great support in every step in the process, as well as their vast knowledge and understanding of the problems we were trying to tackle made it an easy choice for us.”

Related content: