Skip to content

Commit 3ff13f0

Browse files
committed
Reorganize Redis Sentinel configuration section for clarity and redundancy in sentinel addresses
Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com>
1 parent 65456b0 commit 3ff13f0

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

daprdocs/content/en/reference/components-reference/supported-pubsub/setup-redis-pubsub.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -114,29 +114,6 @@ You can use [Helm](https://helm.sh/) to quickly create a Redis instance in our K
114114
value: "lhDOkwTlp0"
115115
```
116116

117-
## Redis Sentinel configuration
118-
119-
When using Redis Sentinel for high availability, set `redisType` to `"node"`, enable failover mode with `failover: "true"`, and provide the sentinel master name. Multiple sentinel addresses can be specified as a comma-separated list in the `redisHost` field for redundancy.
120-
121-
```yaml
122-
apiVersion: dapr.io/v1alpha1
123-
kind: Component
124-
metadata:
125-
name: redis-pubsub
126-
spec:
127-
type: pubsub.redis
128-
version: v1
129-
metadata:
130-
- name: redisHost
131-
value: "sentinel1:26379,sentinel2:26379,sentinel3:26379"
132-
- name: redisType
133-
value: "node"
134-
- name: failover
135-
value: "true"
136-
- name: sentinelMasterName
137-
value: "mymaster"
138-
```
139-
140117
{{% /tab %}}
141118

142119
{{% tab "AWS" %}}
@@ -183,6 +160,29 @@ When using Redis Sentinel for high availability, set `redisType` to `"node"`, en
183160
The Dapr CLI automatically deploys a local redis instance in self hosted mode as part of the `dapr init` command.
184161
{{% /alert %}}
185162

163+
## Redis Sentinel configuration
164+
165+
When using Redis Sentinel for high availability, set `redisType` to `"node"`, enable failover mode with `failover: "true"`, and provide the sentinel master name. Multiple sentinel addresses can be specified as a comma-separated list in the `redisHost` field for redundancy.
166+
167+
```yaml
168+
apiVersion: dapr.io/v1alpha1
169+
kind: Component
170+
metadata:
171+
name: redis-pubsub
172+
spec:
173+
type: pubsub.redis
174+
version: v1
175+
metadata:
176+
- name: redisHost
177+
value: "sentinel1:26379,sentinel2:26379,sentinel3:26379"
178+
- name: redisType
179+
value: "node"
180+
- name: failover
181+
value: "true"
182+
- name: sentinelMasterName
183+
value: "mymaster"
184+
```
185+
186186
## Related links
187187
- [Basic schema for a Dapr component]({{% ref component-schema %}})
188188
- Read [this guide]({{% ref "howto-publish-subscribe.md#step-2-publish-a-topic" %}}) for instructions on configuring pub/sub components

0 commit comments

Comments
 (0)