Skip to content

Conversation

inishchith
Copy link

@inishchith inishchith commented Aug 15, 2025

Enable failover support while maintaining cluster restrictions for distributed lock safety

Thank you for helping make the Dapr documentation better!

Please follow this checklist before submitting:

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Read the contribution guide
  • Commands include options for Linux, MacOS, and Windows within codetabs
  • New file and folder names are globally unique
  • Page references use shortcodes instead of markdown or URL links
  • Images use HTML style and have alternative text
  • Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:

Description

  • This change adds documentation for addition of Redis Sentinel support to Redis lock component refer
Screenshot 2025-08-15 at 1 11 05 PM

Issue reference

Enable failover support while maintaining cluster restrictions
for distributed lock safety

Signed-off-by: inishchith <[email protected]>
Copy link
Contributor

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM, thank you! Please wait on merging docs until the contrib PR is merged.

@msfussell msfussell added this to the 1.16 milestone Aug 19, 2025
@msfussell msfussell added the waiting-on-code-pr The code PR needs to be merged before the docs are updated label Aug 19, 2025
@inishchith inishchith force-pushed the feat-lock-redis-sentinel branch from 4ada25a to 58dbd10 Compare August 20, 2025 14:53
Signed-off-by: Nishchith Shetty <[email protected]>
Signed-off-by: inishchith <[email protected]>
@inishchith inishchith force-pushed the feat-lock-redis-sentinel branch from 58dbd10 to 7cecdfe Compare August 20, 2025 14:54
@nelson-parente
Copy link
Contributor

Contrib PR merged, removing label!
dapr/components-contrib#3973

@nelson-parente nelson-parente removed the waiting-on-code-pr The code PR needs to be merged before the docs are updated label Aug 21, 2025
Copy link
Contributor

@alicejgibbons alicejgibbons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor suggestions @inishchith, otherwise looks good!

@@ -86,6 +86,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| maxRetryBackoff | N | Maximum backoff between each retry. Defaults to `2` seconds; `"-1"` disables backoff. | `3000000000` |
| failover | N | Enable failover configuration. Needs sentinelMasterName to be set. The redisHost should be the sentinel host address. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/). Defaults to `"false"` | `"true"`, `"false"` |
| sentinelMasterName | N | The sentinel master name. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/) | `"mymaster"` |
| sentinelPassword | N | Password for Redis sentinel. No Default. Can be `secretKeyRef` to use a secret reference | `""`, `"KeFg23!"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| sentinelPassword | N | Password for Redis sentinel. No Default. Can be `secretKeyRef` to use a secret reference | `""`, `"KeFg23!"`
| sentinelPassword | N | Password for Redis Sentinel. No Default. Applicable only when “failover” is true, and Redis Sentinel has authentication enabled | `""`, `"KeFg23!"`

@@ -182,6 +183,18 @@ You can use [Helm](https://helm.sh/) to quickly create a Redis instance in our K
{{< /tabpane >}}


## Redis Sentinel Behavior
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Redis Sentinel Behavior
## Redis Sentinel behavior


Use `redisType: "node"` when connecting to Redis Sentinel. Additionally, set `failover` to `"true"` and `sentinelMasterName` to the name of the master node.

**Failover Characteristics:**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Failover Characteristics:**
Failover characteristics:

Use `redisType: "node"` when connecting to Redis Sentinel. Additionally, set `failover` to `"true"` and `sentinelMasterName` to the name of the master node.

**Failover Characteristics:**
- **Lock Loss During Failover**: Locks may be lost during master failover if they weren't replicated to the promoted replica before the original master failed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Lock Loss During Failover**: Locks may be lost during master failover if they weren't replicated to the promoted replica before the original master failed
- Lock loss during failover: Locks may be lost during master failover if they weren't replicated to the promoted replica before the original master failed


**Failover Characteristics:**
- **Lock Loss During Failover**: Locks may be lost during master failover if they weren't replicated to the promoted replica before the original master failed
- **Failover Window**: Brief unavailability (typically seconds) during automatic master promotion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Failover Window**: Brief unavailability (typically seconds) during automatic master promotion
- Failover window: Brief server unavailability (typically seconds) during automatic master promotion

**Failover Characteristics:**
- **Lock Loss During Failover**: Locks may be lost during master failover if they weren't replicated to the promoted replica before the original master failed
- **Failover Window**: Brief unavailability (typically seconds) during automatic master promotion
- **Consistency**: All operations route to the current master, maintaining lock consistency
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Consistency**: All operations route to the current master, maintaining lock consistency
- Consistency: All operations route to the current master, maintaining lock consistency

- **Lock Loss During Failover**: Locks may be lost during master failover if they weren't replicated to the promoted replica before the original master failed
- **Failover Window**: Brief unavailability (typically seconds) during automatic master promotion
- **Consistency**: All operations route to the current master, maintaining lock consistency
- **Trade-off**: High availability vs. potential lock loss during failover events
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Trade-off**: High availability vs. potential lock loss during failover events

- **Consistency**: All operations route to the current master, maintaining lock consistency
- **Trade-off**: High availability vs. potential lock loss during failover events

⚠️ **Important**: Consider your application's tolerance for brief lock loss during failover scenarios.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
⚠️ **Important**: Consider your application's tolerance for brief lock loss during failover scenarios.
{{% alert title="Warning" color="warning" %}}
Consider the trade-off of running Redis with high-availability and failover with the potential of lock loss during failover events. Your application should tolerate brief lock loss during failover scenarios.
{{% /alert %}}

@inishchith
Copy link
Author

A couple minor suggestions @inishchith, otherwise looks good!

thanks @alicejgibbons - fixed now!

Copy link
Contributor

@alicejgibbons alicejgibbons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm @inishchith can you fix the dco? Just git commit --amend --signoff

Copy link
Member

@msfussell msfussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@inishchith inishchith force-pushed the feat-lock-redis-sentinel branch from a7cadc0 to c363cd5 Compare August 27, 2025 18:05
@inishchith
Copy link
Author

inishchith commented Aug 27, 2025

lgtm @inishchith can you fix the dco? Just git commit --amend --signoff

@alicejgibbons fixed now!

@msfussell msfussell merged commit 69ae1c8 into dapr:v1.16 Aug 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants