-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathredis.conf
More file actions
209 lines (153 loc) · 5.66 KB
/
redis.conf
File metadata and controls
209 lines (153 loc) · 5.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# Redis Configuration File for Multi-Agent Orchestration System
# Production-ready configuration with persistence and security
# =====================================================
# General Settings
# =====================================================
# Accept connections from all interfaces (in Docker)
bind 0.0.0.0
# TCP listen port
port 6379
# TCP backlog for incoming connections
tcp-backlog 511
# Close the connection after a client is idle for N seconds
timeout 0
# Send TCP keepalive probes to clients
tcp-keepalive 300
# Run server in background
daemonize no
# Set server verbosity to specified level
loglevel notice
# Set number of databases
databases 16
# =====================================================
# Persistence
# =====================================================
# RDB (Snapshot) Persistence
# save <seconds> <changes>
# Save the DB on disk:
save 900 1 # after 900 sec (15 min) if at least 1 key changed
save 300 10 # after 300 sec (5 min) if at least 10 keys changed
save 60 10000 # after 60 sec if at least 10000 keys changed
# Compress string objects using LZF when dump .rdb databases
rdbcompression yes
# Checksum the RDB file
rdbchecksum yes
# Name of the RDB file
dbfilename dump.rdb
# Working directory
dir ./
# =====================================================
# AOF (Append-Only File) Persistence
# =====================================================
# Enable AOF
appendonly yes
# AOF filename
appendfilename "appendonly.aof"
# AOF fsync policy
# appendfsync always - fsync after every write (slowest, safest)
# appendfsync everysec - fsync once per second (recommended, default)
# appendfsync no - let OS fsync (fastest, least safe)
appendfsync everysec
# Don't fsync if there are still writes being processed
no-appendfsync-on-rewrite no
# Automatic rewrite of the AOF file
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
# =====================================================
# Memory Management
# =====================================================
# Maximum memory Redis can use
maxmemory 512mb
# Memory eviction policy when max memory is reached
# noeviction - don't evict anything, just return errors when memory exceeded
# allkeys-lru - evict any key according to LRU algorithm
# allkeys-lfu - evict any key according to LFU algorithm
# volatile-lru - evict keys with TTL set, LRU algorithm
# volatile-lfu - evict keys with TTL set, LFU algorithm
# volatile-ttl - evict keys with TTL, expire soonest first
# volatile-random - evict keys with TTL, random selection
# allkeys-random - evict random keys
maxmemory-policy allkeys-lru
# =====================================================
# Keyspace Notifications
# =====================================================
# Enable keyspace notifications for key events
notify-keyspace-events "KEA"
# =====================================================
# Slow Query Log
# =====================================================
# Log queries slower than specified microseconds
slowlog-log-slower-than 10000
# Maximum length of slow log
slowlog-max-len 128
# =====================================================
# Security
# =====================================================
# Require a password to connect
requirepass redis123
# Rename dangerous commands or disable them
rename-command FLUSHDB ""
rename-command FLUSHALL ""
rename-command DEBUG ""
rename-command CONFIG "CONFIG_MANAGEMENT_KEY"
# =====================================================
# Client Management
# =====================================================
# Max number of connected clients
maxclients 10000
# =====================================================
# Replication (for cluster setup)
# =====================================================
# Disable replication in standalone mode
# replicaof <host> <port>
# =====================================================
# Advanced Settings
# =====================================================
# Lua script call timeout (milliseconds)
lua-time-limit 5000
# Minimum slaves to write to (for replication)
# min-slaves-to-write 0
# min-slaves-max-lag 10
# Stop accepting writes if no replicas available
# min-replicas-to-write 0
# Cluster mode (disabled for standalone)
# cluster-enabled yes
# ACL configuration file
# aclfile /etc/redis/acl.conf
# =====================================================
# Lazy Free Settings
# =====================================================
# DEL, UNLINK, FLUSHDB, etc. perform lazy freeing
lazyfree-lazy-eviction yes
lazyfree-lazy-expire yes
lazyfree-lazy-server-del yes
replica-lazy-flush yes
# =====================================================
# Monitoring & Metrics
# =====================================================
# Latency monitoring threshold (milliseconds)
latency-monitor-threshold 0
# Enable active defragmentation
# activedefrag yes
# Minimum percentage of fragmentation to trigger defrag
# active-defrag-ignore-bytes 100mb
# active-defrag-threshold-lower 10
# =====================================================
# Performance
# =====================================================
# Enable RESP3 protocol (if client supports)
# resp3-proto-enabled yes
# Frequency of background task operations
hz 10
# =====================================================
# Module Loading
# =====================================================
# Load modules (if using)
# loadmodule /usr/lib/redis/modules/mymodule.so
# =====================================================
# Advanced User Configuration
# =====================================================
# Protected mode (only accept connections from localhost when no ACL)
protected-mode yes
# Enable automatic IPv6 address discovery in Sentinel/Cluster
enable-ipv6 no