multiple dragonflydb instances just creates more overhead, actually

This commit is contained in:
Ruben 2025-10-08 23:33:45 -05:00
commit 32d1e324cc
Signed by: sneexy
GPG key ID: 8ECFA045E63BC583
2 changed files with 19 additions and 41 deletions

View file

@ -96,12 +96,8 @@ services:
- ./media:/sharkey/.config - ./media:/sharkey/.config
- ./default.yml:/sharkey/.config/default.yml:ro - ./default.yml:/sharkey/.config/default.yml:ro
# "redis is for caching" WRONG!!! it is long term persistent storage in misskey. for some reason. "caching". # dragonflydb (redis), as is required by misskey for a good amount of data
# do NOT wipe redis or you lose a bunch of actual data like timelines and notifications. dragonflydb:
# also, we use dragonflydb over redis. personal preference, better performance and stability.
# general dfdb
dragonfly:
image: docker.dragonflydb.io/dragonflydb/dragonfly image: docker.dragonflydb.io/dragonflydb/dragonfly
restart: always restart: always
ulimits: ulimits:
@ -117,10 +113,10 @@ services:
DFLY_df_snapshot_format: false # misskey doesn't know how to handle dfdb's format DFLY_df_snapshot_format: false # misskey doesn't know how to handle dfdb's format
DFLY_dir: '/data' # directory with the snapshot/data DFLY_dir: '/data' # directory with the snapshot/data
volumes: volumes:
- ./dragonfly/general:/data - ./dfdb:/data
# job queue dfdb # dragonflydb, for caching and required by *key for storing important data
dragonfly-queue: dfdb:
image: docker.dragonflydb.io/dragonflydb/dragonfly image: docker.dragonflydb.io/dragonflydb/dragonfly
restart: always restart: always
ulimits: ulimits:
@ -128,34 +124,16 @@ services:
networks: networks:
- sharkey - sharkey
environment: environment:
DFLY_port: 6380 # these envvars are important in order for dragonflydb/misskey to interact with each other properly, and to load and save all data properly
DFLY_snapshot_cron: '* * * * *' DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false DFLY_version_check: false
DFLY_default_lua_flags: allow-undeclared-keys DFLY_default_lua_flags: allow-undeclared-keys # without this, dfdb would immediately complain loading data
DFLY_dbfilename: 'dump.rdb' DFLY_dbfilename: 'dump.rdb' # misskey expects this
DFLY_df_snapshot_format: false DFLY_df_snapshot_format: false # misskey doesn't know how to handle dfdb's format
DFLY_dir: '/data' DFLY_dir: '/data' # directory with the snapshot/data
volumes: volumes:
- ./dragonfly/queue:/data #- ./dragonfly/general:/data
- ./dfdb:/data
# timelines dfdb
dragonfly-tl:
image: docker.dragonflydb.io/dragonflydb/dragonfly
restart: always
ulimits:
memlock: -1
networks:
- sharkey
environment:
DFLY_port: 6381
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_dbfilename: 'dump.rdb'
DFLY_df_snapshot_format: false
DFLY_dir: '/data'
volumes:
- ./dragonfly/timelines:/data
networks: networks:
db: db:

View file

@ -141,7 +141,7 @@ dbReplications: false
#───┘ Redis configuration └───────────────────────────────────── #───┘ Redis configuration └─────────────────────────────────────
redis: redis:
host: dragonfly host: dfdb
port: 6379 port: 6379
#family: 0 # 0=Both, 4=IPv4, 6=IPv6 #family: 0 # 0=Both, 4=IPv4, 6=IPv6
#pass: example-pass #pass: example-pass
@ -160,9 +160,9 @@ redis:
# # You can specify more ioredis options... # # You can specify more ioredis options...
# #username: example-username # #username: example-username
redisForJobQueue: #redisForJobQueue:
host: dragonfly-queue # host: dragonfly-queue
port: 6380 # port: 6380
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6
# #pass: example-pass # #pass: example-pass
# #prefix: example-prefix # #prefix: example-prefix
@ -170,9 +170,9 @@ redisForJobQueue:
# # You can specify more ioredis options... # # You can specify more ioredis options...
# #username: example-username # #username: example-username
redisForTimelines: #redisForTimelines:
host: dragonfly-tl # host: dragonfly-tl
port: 6381 # port: 6381
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6
# #pass: example-pass # #pass: example-pass
# #prefix: example-prefix # #prefix: example-prefix