Skip to content

feat: add Redis Sentinel support for high availability #5008

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ns-rboyd
Copy link

@ns-rboyd ns-rboyd commented Jun 11, 2025

Implement Redis Sentinel support to enable high availability Redis configurations as an alternative to Redis Cluster. This leverages existing ARQ support for Sentinel connections.

Features:

  • Shared Redis configuration module supporting both direct Redis and Sentinel
  • Environment variable configuration for Sentinel setup:
    • REDIS_SENTINEL_ENABLED=true
    • REDIS_SENTINEL_HOSTS=host1:port1,host2:port2 (comma-separated)
    • REDIS_SENTINEL_SERVICE_NAME=mymaster (configurable)
  • Refactored ARQ pool and worker to use centralized Redis settings
  • Comprehensive E2E test suite with Docker Compose setup
  • Support for authentication and connection retry configuration

The implementation maintains backward compatibility with existing direct Redis configurations while adding Sentinel capability for production high availability deployments.

closes #5007

Implement Redis Sentinel support to enable high availability Redis
configurations as an alternative to Redis Cluster. This leverages
existing ARQ support for Sentinel connections.

Features:
- Shared Redis configuration module supporting both direct Redis and Sentinel
- Environment variable configuration for Sentinel setup:
  - REDIS_SENTINEL_ENABLED=true
  - REDIS_SENTINEL_HOSTS=host1:port1,host2:port2 (comma-separated)
  - REDIS_SENTINEL_SERVICE_NAME=mymaster (configurable)
- Refactored ARQ pool and worker to use centralized Redis settings
- Comprehensive E2E test suite with Docker Compose setup
- Support for authentication and connection retry configuration

The implementation maintains backward compatibility with existing
direct Redis configurations while adding Sentinel capability for
production high availability deployments.
Copy link

vercel bot commented Jun 11, 2025

@ns-rboyd is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

cursor-com bot commented Jun 11, 2025

🚨 BugBot couldn't run

Pull requests from forked repositories are not yet supported (requestId: serverGenReqId_d1cafc74-e60a-4c53-8ffe-0adf844e0ce6).

@CLAassistant
Copy link

CLAassistant commented Jun 11, 2025

CLA assistant check
All committers have signed the CLA.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Feature A new feature labels Jun 11, 2025
Copy link

vercel bot commented Jun 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
keep ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2025 10:05am

talboren
talboren previously approved these changes Jun 12, 2025
Copy link
Member

@talboren talboren left a comment

Choose a reason for hiding this comment

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

LGTM! thank you for this @ns-rboyd

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 12, 2025
@talboren
Copy link
Member

@ns-rboyd i can see there are some linting problems, care fixing that so we can merge it?

Copy link

cursor-com bot commented Jun 12, 2025

🚨 BugBot couldn't run

Pull requests from forked repositories are not yet supported (requestId: serverGenReqId_d767dc2f-5ad0-4d36-83b9-b4bc089394cd).

Copy link

cursor-com bot commented Jun 12, 2025

🚨 BugBot couldn't run

Pull requests from forked repositories are not yet supported (requestId: serverGenReqId_dd80fcfa-2491-4aa9-a6e2-d796213ad618).

shahargl
shahargl previously approved these changes Jun 12, 2025
Copy link
Member

@shahargl shahargl left a comment

Choose a reason for hiding this comment

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

lgtm

@shahargl
Copy link
Member

@ns-rboyd can you fix it?

CleanShot 2025-06-12 at 13 45 12@2x

@ns-rboyd ns-rboyd dismissed stale reviews from shahargl and talboren via e46555c June 12, 2025 11:38
Copy link

cursor-com bot commented Jun 12, 2025

🚨 BugBot couldn't run

Pull requests from forked repositories are not yet supported (requestId: serverGenReqId_7297ae66-3320-4ea1-924a-aa294e50d4a4).

Copy link

cursor-com bot commented Jun 12, 2025

🚨 BugBot couldn't run

Pull requests from forked repositories are not yet supported (requestId: serverGenReqId_eac77b49-e446-4fee-bcb7-ddda728f0d13).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature A new feature lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[➕ Feature]: Support Redis Sentinel
4 participants