-
Notifications
You must be signed in to change notification settings - Fork 773
feat: add Redis Sentinel support to Redis lock component documentation #4771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v1.16
Are you sure you want to change the base?
Conversation
Enable failover support while maintaining cluster restrictions for distributed lock safety Signed-off-by: inishchith <[email protected]>
There was a problem hiding this 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.
4ada25a
to
58dbd10
Compare
Signed-off-by: Nishchith Shetty <[email protected]> Signed-off-by: inishchith <[email protected]>
58dbd10
to
7cecdfe
Compare
Contrib PR merged, removing label! |
There was a problem hiding this 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!"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## 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:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ **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 %}} |
thanks @alicejgibbons - fixed now! |
There was a problem hiding this 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: inishchith <[email protected]>
a7cadc0
to
c363cd5
Compare
@alicejgibbons fixed now! |
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:
In addition, please fill out the following to help reviewers understand this pull request:
Description
Issue reference