-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathdefault.toml
More file actions
72 lines (66 loc) · 2.34 KB
/
default.toml
File metadata and controls
72 lines (66 loc) · 2.34 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
[[clusters]]
name = "test-redis-standalone"
listen_addr = "0.0.0.0:7787"
hash_tag = "{}"
cache_type = "redis"
servers = [
"127.0.0.1:6379:10 redis-1",
]
thread = 1
fetch_interval = 3600000
read_from_slave = false
ping_fail_limit = 10
ping_interval = 30000
read_timeout = 1000
write_timeout = 1000
dial_timeout = 500
listen_proto = "tcp"
node_connections = 1
# 旧版简单密码写法,等价于 auth = { users = [{ username = "default", password = "example" }] }
password = "example-frontend-secret"
# 后端 ACL:此处演示用户名 + 密码;如果后端是简单密码,可直接使用 backend_password
backend_auth = { username = "proxy", password = "example-backend-secret" }
# 慢查询日志阈值(微秒);默认 10000,设置为 -1 以关闭记录
slowlog_log_slower_than = 10000
# 慢查询日志最大保留条数;默认 128
slowlog_max_len = 128
# 热点 Key 分析参数
hotkey_sample_every = 32
hotkey_sketch_width = 4096
hotkey_sketch_depth = 4
hotkey_capacity = 512
hotkey_decay = 0.925
[[clusters]]
name = "test-cluster"
listen_addr = "0.0.0.0:7788"
hash_tag = "{}"
thread = 1
cache_type = "redis_cluster"
servers = ["127.0.0.1:3300"]
fetch_interval = 1800000 # 1800s , 30 minutes
fetch_since_latest_cmd = 1000 # 3600s , 1 hour
read_from_slave = false
ping_fail_limit = 10
ping_interval = 300
read_timeout = 1000
write_timeout = 1000
dial_timeout = 500
listen_proto = "tcp"
node_connections = 1
# 更复杂的 ACL 配置,支持多个前端用户(default 用户必须显式配置密码)
auth = { password = "cluster-default-secret", users = [
{ username = "ops", password = "ops-secret" },
{ username = "audit", password = "audit-secret" },
] }
# 旧版写法依然兼容:backend_password = "raw-secret"
backend_password = "cluster-backend-secret"
# 慢查询日志阈值(微秒);默认 10000,设置为 -1 以关闭记录
slowlog_log_slower_than = 10000
# 慢查询日志最大保留条数;默认 128
slowlog_max_len = 128
# 热点 Key 分析参数
hotkey_sample_every = 32
hotkey_sketch_width = 4096
hotkey_sketch_depth = 4
hotkey_capacity = 512
hotkey_decay = 0.925