From 30bfc0d26789dbd2cc555048032bca951ebf2a90 Mon Sep 17 00:00:00 2001 From: caojiajun Date: Sun, 28 Jul 2024 16:40:57 +0800 Subject: [PATCH] docs: update (#234) --- docs/camellia-redis-proxy/deploy/cluster_mode-1.md | 7 ++++++- docs/camellia-redis-proxy/deploy/cluster_mode-2.md | 10 ++++++++-- docs/camellia-redis-proxy/deploy/sentinel_mode.md | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/camellia-redis-proxy/deploy/cluster_mode-1.md b/docs/camellia-redis-proxy/deploy/cluster_mode-1.md index f0246cec2..0c414bc51 100644 --- a/docs/camellia-redis-proxy/deploy/cluster_mode-1.md +++ b/docs/camellia-redis-proxy/deploy/cluster_mode-1.md @@ -1,7 +1,12 @@ ## cluster-mode-1 -无中心化的cluster-mode方案,基于节点间的心跳完成节点的互相发现和最终一致 +* 无中心化的cluster-mode方案,基于节点间的心跳完成节点的互相发现和最终一致 + +### 应用场景 + +* 期望使用redis-proxy,客户端支持redis-cluster协议 +* 提前知道proxy-ip的情况下,可以在不需要外部组件(如lvs、slb、zk、etcd等)的情况下,让proxy组成高可用集群(即能平滑扩缩容、节点宕机能自动fail-over) ### 配置: diff --git a/docs/camellia-redis-proxy/deploy/cluster_mode-2.md b/docs/camellia-redis-proxy/deploy/cluster_mode-2.md index 7e9d2a6a6..9d8dd0854 100644 --- a/docs/camellia-redis-proxy/deploy/cluster_mode-2.md +++ b/docs/camellia-redis-proxy/deploy/cluster_mode-2.md @@ -2,8 +2,14 @@ ## cluster-mode-2 * 中心化的cluster-mode方案,首先选举一个leader节点,并且由leader节点来完成节点的扩缩容 -* 相比方案一,在扩缩容时,本方案会尽可能的减少slot的变化 -* 相比方案一,可以不需要提前知道节点的ip + +### 应用场景 + +* 期望使用redis-proxy,客户端支持redis-cluster协议 +* 可以让proxy自己组成高可用集群(即能平滑扩缩容、节点宕机能自动fail-over) +* 相比于cluster-mode-1,可以不需要提前知道节点ip +* 相比于cluster-mode-1,节点扩缩容时会尽可能减少slot的变化(因此适合proxy后端是kv存储时,提升lru-cache的有效性) +* 在k8s环境下,客户端可以连接service域名,连接到任意一个节点获取slot信息,随后直连pod,性能上因为不依赖service底层的负载均衡机制,流量更均衡,性能损耗更小 ### 配置 diff --git a/docs/camellia-redis-proxy/deploy/sentinel_mode.md b/docs/camellia-redis-proxy/deploy/sentinel_mode.md index 7bf3e21f8..0f3448690 100644 --- a/docs/camellia-redis-proxy/deploy/sentinel_mode.md +++ b/docs/camellia-redis-proxy/deploy/sentinel_mode.md @@ -40,7 +40,7 @@ proxy.sentinel.mode.nodes=192.168.3.218:6380@16380,192.168.3.218:6390@16390 ``` 配置节点发现规则(基于redis) ```properties -### 此时集群内的节点会通过redis自动彼此发现 +### 此时集群内的节点会通过redis自动彼此发现,优点是可以不需要提前知道节点ip,适用于k8s环境 proxy.sentinel.mode.nodes.provider.class.name=com.netease.nim.camellia.redis.proxy.sentinel.RedisProxySentinelModeNodesProvider proxy.sentinel.mode.nodes.provider.redis.url=redis://passwd@127.0.0.1 proxy.sentinel.mode.nodes.provider.redis.key=xxxx