mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #15718] [MERGED] feat: add Redis Sentinel failover support for high availability #23926
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15718
Author: @sihyeonn
Created: 7/15/2025
Status: ✅ Merged
Merged: 7/16/2025
Merged by: @tjbck
Base:
dev← Head:feat/sh-support-failover📝 Commits (6)
423d092feat: add Redis Sentinel failover support for high availability728c39echore: add tests with pytest-asyncio5fe0c83chore: update lock file for pytest-asyncio1b7ac7cchore: format, lint65882c3refactor: change MAX_RETRY_COUNT as env9067eacchore: add log for redis.exceptions📊 Changes
5 files changed (+3191 additions, -2532 deletions)
View changed files
📝
backend/open_webui/env.py(+9 -0)➕
backend/open_webui/test/util/test_redis.py(+793 -0)📝
backend/open_webui/utils/redis.py(+100 -4)📝
pyproject.toml(+5 -0)📝
uv.lock(+2284 -2528)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
SentinelRedisProxyclass with retry logic to handle master failover scenarios seamlessly.Added
SentinelRedisProxyclass for Redis Sentinel integration with automatic failoverMAX_RETRY_COUNTfor connection resilienceConnectionErrorandReadOnlyErrorexceptionsChanged
get_redis_connection()to support Sentinel-based connectionsFixed
Security
Breaking Changes
Additional Information
ConnectionErrorandReadOnlyErrorexceptions with failoverScreenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.