# Dragonfly, an alternative Redis/Memcached implementation

**URL:** <https://help.nextcloud.com/t/dragonfly-an-alternative-redis-memcached-implementation/199990>\
**Category:** ℹ️ Support\
**Tags:** redis\
**Created:** [August 2, 2024, 5:21pm UTC](https://help.nextcloud.com/t/dragonfly-an-alternative-redis-memcached-implementation/199990 "2024-08-02T17:21:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gatak](https://help.nextcloud.com/letter_avatar/gatak/32/5_5575768a8748004e209b776fc1b2916d.png) [@Gatak](https://help.nextcloud.com/u/Gatak)\
**Post date:** [August 2, 2024, 5:21pm UTC](https://help.nextcloud.com/t/dragonfly-an-alternative-redis-memcached-implementation/199990/1 "2024-08-02T17:21:02Z")

</div>

Hi, I am investigating if Dragonfly can be used as a Redis or Memcached implementation for Nextcloud.

[Dragonfly](https://github.com/dragonflydb/dragonfly) is a multithreaded in-memory database that scales out very well with increased core count, as a contrast to Redis which is single threaded only.

The [Nextcloud requirements](https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html) doesn’t specify what minimum Redis API version is required, so I wanted to ask if anyone has tested or investigated this?

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [August 2, 2024, 6:46pm UTC](https://help.nextcloud.com/t/dragonfly-an-alternative-redis-memcached-implementation/199990/2 "2024-08-02T18:46:50Z")

</div>

> [@Gatak](#):
>
> The [Nextcloud requirements](https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html) doesn’t specify what minimum Redis API version is required, so I wanted to ask if anyone has tested or investigated this?

Redis 4.0 currently:

It’s documented in the Memory Caching section: [Memory caching — Nextcloud latest Administration Manual latest documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#memory-caching)

---

<div class="post-metadata">

**Author:** ![Gatak](https://help.nextcloud.com/letter_avatar/gatak/32/5_5575768a8748004e209b776fc1b2916d.png) [@Gatak](https://help.nextcloud.com/u/Gatak)\
**Post date:** [August 2, 2024, 7:17pm UTC](https://help.nextcloud.com/t/dragonfly-an-alternative-redis-memcached-implementation/199990/3 "2024-08-02T19:17:53Z")

</div>

Thank you. I had missed that section.

---

<div class="post-metadata">

**Author:** ![ernolf](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ernolf/32/77874_2.png) [@ernolf](https://help.nextcloud.com/u/ernolf)\
**Post date:** [August 2, 2024, 9:55pm UTC](https://help.nextcloud.com/t/dragonfly-an-alternative-redis-memcached-implementation/199990/4 "2024-08-02T21:55:47Z")

</div>

> [@Gatak](#):
>
> I wanted to ask if anyone has tested or investigated this?

It should normaly be no major problem to replace redis with dragonfly.

The problem is, that dragonfly has minimal support requirements (SSE4, AVX2) that a processor should support. If you want to use it on older hardware, you have to build it yourself.

But you can try, it should be completely transparent. Simply change the redis connection settings in config/config.php to point to the dragonfly deamon.

If it works, please report it here.  
If it does not work, you can simply switch back 😉

* * *

Much and good luck,  
ernolf

---

<div class="post-metadata">

**Author:** ![Gatak](https://help.nextcloud.com/letter_avatar/gatak/32/5_5575768a8748004e209b776fc1b2916d.png) [@Gatak](https://help.nextcloud.com/u/Gatak)\
**Post date:** [August 7, 2024, 5:18pm UTC](https://help.nextcloud.com/t/dragonfly-an-alternative-redis-memcached-implementation/199990/5 "2024-08-07T17:18:22Z")

</div>

Yea, dragonfly isn’t packaged for my distro, so I built from sources.

So far there are no issues using Dragonfly with Nextcloud. I’ve noticed that for a single instance stuff like `occ files:scan --all` is somewhat slower. However, switching to unix socket instead of tcp almost made the files scan about 50% faster for both Redis and Dragonfly, which was a nice find 🙂

I also tried the Redis `memtier_benchmark`:

`memtier_benchmark -S /tmp/redis.sock -c 20 --test-time 30 -t 4 -d 256 --distinct-client-seed`

Dragonfly vs Redis over unix socket:

 ![dfly-redis-sock](https://help.nextcloud.com/uploads/default/original/3X/a/0/a09fff4683a90574758c4d5aabbf1b907aa19874.png)

Dragonfly vs Redis over tcp (127.0.0.1):

 ![dfly-redis-tcp](https://help.nextcloud.com/uploads/default/original/3X/0/8/0860b3bf3a9ecba39063bee97efcefdb565b0ef0.png)

> **[GitHub - RedisLabs/memtier\_benchmark: NoSQL Redis and Memcache traffic generation and...](https://github.com/RedisLabs/memtier_benchmark)**
>
> NoSQL Redis and Memcache traffic generation and benchmarking tool.

> **[GitHub - dragonflydb/dragonfly: A modern replacement for Redis and Memcached](https://github.com/dragonflydb/dragonfly)**
>
> A modern replacement for Redis and Memcached

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [November 5, 2024, 5:18pm UTC](https://help.nextcloud.com/t/dragonfly-an-alternative-redis-memcached-implementation/199990/6 "2024-11-05T17:18:59Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
