DragonFly Config File Support in v1.34.2 - Equivalent to Redis

Starting journey with DragonFly version 1.34.2 …

I am unable to provide dragonfly.conf (as that of redis) while starting the dragonfly service. (linux)

I am able to provide “-–flagfile flags.conf” but it doesn’t support all properties similar to redis.

[root@ip-172-31-0-22 ~]# /dragonFly/dragonfly --flagfile /etc/dragonfly/dragonfly_flags.conf
ERROR: Unknown command line flag ‘announce-ip’
ERROR: Unknown command line flag ‘announce-port’
ERROR: Unknown command line flag ‘databases’
ERROR: Unknown command line flag ‘loglevel’
ERROR: Unknown command line flag ‘maxmemory-policy’
ERROR: Unknown command line flag ‘notify-keyspace-events’
ERROR: Unknown command line flag ‘protected-mode’
ERROR: Unknown command line flag ‘save’
ERROR: Unknown command line flag ‘save’
ERROR: Unknown command line flag ‘save’
ERROR: Unknown command line flag ‘slowlog-log-slower-than’
ERROR: Unknown command line flag ‘slowlog-max-len’
ERROR: Unknown command line flag ‘tcp-keepalive’

Content of “Flags.conf”

–announce-ip=172.Y.x.x
–announce-port=6379
–bind=172.Y.x.x
–bind=127.0.0.1
–databases=16
–dbfilename=dump.rdb
–dir=/dragonFly/dragondata/data
–log_dir=/dragonFly/var/log/dragonfly
–loglevel=notice
–maxmemory=20GB
–maxmemory-policy=noeviction
–notify-keyspace-events=“”
–port=6379
–protected-mode=no
–save=300 10
–save=60 10000
–save=900 1
–slowlog-log-slower-than=10000
–slowlog-max-len=128
–tcp-keepalive=300
–tiered_prefix=/dragonFly/dragondata/ssd

Please guide for the right documentation.

Hi @thangaprakash,

Sorry for the confusion. Dragonfly doesn’t support exactly the same configuration options Redis does. Due to the architectural design differences, we need a different set of configs. They can all be found here: Server Configuration Flags | Dragonfly

For example, we use a cron string to save backups periodically:

--snapshot_cron="*/5 * * * *"

To streamline the experience of using CLI, environment variables, or a flagfile, I believe that all options should use _ instead of -, so it should be --slowlog_log_slower_than for Dragonfly.

Also, we don’t have 8 maxmemory eviction policies. If you want eviction, simply pass:

--cache_mode=true

thanks @joezhou_df for guidence.

.

1 Like