mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-07 12:37:41 +01:00
Document redis3 username and keyPrefix options
1 parent
d89977b882
commit
33ed2f765d
1 file changed
+16
-1
+16
-1
@@ -30,4 +30,19 @@ Compared to `redis2`, there are extra Redis operations to maintain this list:
|
||||
One Redis operation costs about 25 microseconds. The extra Redis operations cost about 4 Redis round trips when running with 1 million items. The cost is relatively small compared to the whole file creation/update/deletion process.
|
||||
|
||||
# Note
|
||||
The file read operation is still just one Redis operation, since it does not need to read the list of other directory items.
|
||||
The file read operation is still just one Redis operation, since it does not need to read the list of other directory items.
|
||||
# `redis3` configuration
|
||||
|
||||
`redis3`, `redis_cluster3`, and `redis3_sentinel` accept the same `username`, `password`, and `keyPrefix` options as `redis2`:
|
||||
|
||||
```toml
|
||||
[redis3]
|
||||
enabled = true
|
||||
address = "localhost:6379"
|
||||
username = "seaweedfs" # Redis 6+/Valkey ACL user; requires `password`
|
||||
password = "SOME_PASSWORD"
|
||||
database = 0
|
||||
keyPrefix = "seaweedfs_" # every key the store writes is prefixed
|
||||
```
|
||||
|
||||
With `keyPrefix` set, all keys — entries, directory lists, skiplist nodes, locks, and Kv — go under the prefix, so an ACL user can be restricted to `~seaweedfs_*`. A `username` without a `password` is rejected at startup, since an empty password sends no AUTH and would silently connect as the `default` user.
|
||||
Reference in new issue
Block a user