Saturday, June 18, 2022

Redis v/s KeyDB v/s Dragonfly v/s Skytable. It's 5X, 10X and 25X faster

It seems that several projects claim that they have built the "world's fastest key/value store" or sometimes the phrase used is even more outrageous. The following projects are in question:

- Redis: https://ift.tt/a9thiX3

- KeyDB: https://ift.tt/AycEplZ

- Dragonfly: https://ift.tt/du1O42f

- Skytable: https://ift.tt/fbVvK2j

1. Redis: I'll start with Redis which I'd like to call the "original" key/value store because it is the oldest and most widely used of all. Being a long-time follower of Redis, I do know it's single-threaded (and uses io-threads since 6.0) and hence it achieves lesser throughput than the other stores listed above which are multi-threaded, at least to some extent. The best parts about Redis: it's the most feature complete of all the systems here, and is the oldest. (not saying old necessarily means better).

2. KeyDB: The second is KeyDB. IIRC, I saw it in a blog post which said that it is a "multithreaded fork of Redis that is 5X faster"[1]. I really liked the idea because I was previously running several instances of Redis on the same node and proxying them like a "single-node cluster." Why? To increase CPU utilization. A single KeyDB instance could replace the unwanted proxying funkiness, so I ditched Redis for KeyDB. Has been a fine experience so far, except for some occasional crashes.

3. Dragonfly: Just found it on HN and seems to be relatively new. Dragonfly claims that it is 25X faster than Redis[2] and has the slogan "Probably, the fastest in-memory store in the universe!". Doesn't support all the Redis commands yet, but I find it interesting mainly because of performance. Also, it's good to know why it is faster because it clearly outlines the underlying architecture[2]. The other three stores don't say much about it. Also promises lower memory usage which I like.

4. Skytable: Found it while looking for projects written in Rust. Claims to be "insanely fast." Skytable's "experimental benchmarks" claim that it is something around 10X faster than Redis and some 2X-3X faster than KeyDB[3]. I hadn't heard of Skytable and it doesn't seem to be as widely used (unless I'm missing something?). I find it interesting because of the planned features[4] and performance. Only Skytable natively runs on Windows out of the four.

5. My thoughts: Redis needs no introduction and is arguably super stable for use on production systems (using widely in our systems). KeyDB seems to be "stable enough" and it seems to be good for prod since Snapchat uses it already[5] (and so do we!). I found no Dragonfly v/s Skytable benchmarks. The best part about Redis, KeyDB and Skytable is that they don't make any "crazy assumptions" about the system they run on. What do I mean?

Dragonfly expects you to have the latest hardware[6] and the latest kernel[7] on all your servers. I find this outrageous because not all servers run 5.10 and a majority of them are still using long-running branches on 4.x. I'd argue if the other three stores started assuming the latest features, they'd be far faster than what they are today. Finally, both Dragonfly and Skytable are still early in their development so it may not be fair to compare their features against Redis and KeyDB who have been around for far longer. Also, all projects other than Skytable have companies behind them (unless I'm missing something).

What are your thoughts? Have you tried benchmarking any of them locally or in the cloud?

References:

[1]: https://ift.tt/Wf1PFVE

[2]: https://ift.tt/du1O42f

[3]: https://ift.tt/dPVaMNt

[4]: https://ift.tt/l9c2bkg

[5]: https://ift.tt/fP2vakO

[6]: https://ift.tt/HEhBlz1

[7]: https://ift.tt/hC0BEwx



from Hacker News https://ift.tt/Vq8GWlD

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.