# DragonflyDB Configuration for Trackeep # # DragonflyDB is a modern Redis-compatible in-memory database # Optimized for performance and lower memory usage # ============================================================================= # NETWORK # ============================================================================= # Accept connections on all interfaces (safe when behind Docker network) bind 0.0.0.0 # Default port (same as Redis for compatibility) port 6379 # TCP listen() backlog tcp-backlog 511 # Close connection after N seconds of idle time (0 = disabled) timeout 0 # TCP keepalive tcp-keepalive 300 # ============================================================================= # SECURITY # ============================================================================= # Require password for connections # Set via environment variable: requirepass ${DRAGONFLY_PASSWORD} requirepass dragonfly123 # Disable dangerous commands in production rename-command FLUSHDB "" rename-command FLUSHALL "" rename-command CONFIG "CONFIG_9f8a2b3c" rename-command DEBUG "" rename-command SHUTDOWN "SHUTDOWN_7d4e1f9a" # ============================================================================= # MEMORY MANAGEMENT # ============================================================================= # Maximum memory limit (256MB suitable for small-medium deployments) # DragonflyDB is more memory efficient than Redis maxmemory 256mb # Eviction policy when maxmemory is reached # allkeys-lru: Remove less recently used keys first (recommended for caching) maxmemory-policy allkeys-lru # ============================================================================= # PERSISTENCE # ============================================================================= # Enable AOF persistence (recommended for session durability) appendonly yes # AOF file name appendfilename "appendonly.aof" # Sync strategy: everysec (recommended balance) appendfsync everysec # Auto-rewrite AOF when it grows by X% auto-aof-rewrite-percentage 100 # Minimum size before auto-rewrite auto-aof-rewrite-min-size 64mb # Working directory for persistence dir /data # ============================================================================= # CLIENTS & PERFORMANCE # ============================================================================= # Maximum number of client connections maxclients 10000 # Number of databases (default 16) databases 16 # Latency monitoring latency-monitor-threshold 100 # Slow log (log queries taking > N microseconds) slowlog-log-slower-than 10000 # Slow log max length slowlog-max-len 128 # ============================================================================= # LOGGING # ============================================================================= # Log level: debug, verbose, notice, warning loglevel notice # Log file (empty = stdout, good for Docker) logfile "" # ============================================================================= # DRAGONFLYDB SPECIFIC OPTIMIZATIONS # ============================================================================= # Enable DragonflyDB-specific optimizations # These are automatically enabled in DragonflyDB # Better memory management # Improved multi-core utilization # Enhanced performance for caching workloads