Open WebUI Redis Sentinel and cluster failover: when a multi-replica deployment needs it
The question for a multi-replica Open WebUI deployment is whether Redis Sentinel or Redis Cluster is needed at all, and the answer depends on how much an outage of the Redis node would cost your users. The scaling guide requires Redis as a shared state store for sessions, WebSocket connections and application state once several replicas run, so a Redis outage is felt by users directly rather than only by the platform team. A single Redis instance can be enough for a small team with a restart window that people will tolerate, provided you accept that sessions and live connections are interrupted while it recovers.
Failover planning becomes warranted when users cannot tolerate that interruption, when the deployment serves many concurrent sessions, or when your standards require no single node to hold shared state. Sentinel provides monitoring and automatic primary promotion for a replicated Redis setup, while Cluster partitions keys across nodes. Confirm with your Redis vendor or distribution which topology fits your scale, since Open WebUI's use of Redis does not by itself call for sharding. Also confirm which Redis-compatible service you will run and whether it supports the Sentinel or Cluster protocol you choose.
Failover behavior is not decided by the Redis topology alone. It depends on the Redis deployment you build and on the client settings Open WebUI uses to connect, including how it discovers the current primary, how long it waits on a connection, and how it treats a failed command during promotion. Before go-live, test a forced primary failover with several replicas and live WebSocket sessions, and record how long login, chat streaming and sign-out behave. Treat the results as the basis for the timeout and retry settings you adopt, and check the scaling guide for the variables that apply to your Open WebUI version.
Choosing standalone Redis, Sentinel, Cluster or a managed service
This table compares four ways to run Redis behind Open WebUI on who performs failover, what the client must support, and who patches and backs up the nodes. Read it as a checklist of questions to put to your platform team and to any managed provider before you choose a topology. Confirm client compatibility for your exact Open WebUI version before committing to Sentinel or Cluster.
| Decision point | Standalone Redis | Redis Sentinel | Redis Cluster | Managed Redis service |
|---|---|---|---|---|
| Who performs failover | Nobody automatically; a node loss means manual recovery and a restart of the dependent services | Sentinel processes promote a replica to primary and notify clients | The cluster shards and promotes replicas per hash slot | The provider performs failover according to its own service terms |
| Client must be Sentinel-aware | No | Yes; the client must ask Sentinel for the current primary | No, but the client must be cluster-aware and handle slot redirects | Usually no, if the endpoint is a single managed address; confirm this |
| Client must be cluster-aware | No | No | Yes; confirm Open WebUI's Redis client supports cluster mode for your version | Depends on the provider's endpoint model; confirm with the provider |
| Socket timeout behavior during failover | Not applicable beyond a single node outage, which blocks the app until the node returns | Set a socket timeout so requests fail fast during the promotion window instead of hanging | Set a socket timeout and confirm how redirects behave during slot moves | Set a socket timeout; ask the provider how long a failover typically blocks connections |
| Separate WebSocket Redis settings | Confirm whether the WebSocket connection uses the same node or a separate URL | Confirm Sentinel settings apply to both the main and WebSocket connections | Confirm each cluster-aware connection is configured independently | Confirm the endpoint and TLS settings are applied to both connections |
| Who patches the nodes | Your team, on hosts or containers you run | Your team, for every Redis and Sentinel process | Your team, for every shard and replica | The provider, within the scope it documents |
| Who backs up the data | Your team; Redis persistence settings are your responsibility | Your team; backups are taken from a replica or the primary you designate | Your team, per shard | Ask the provider which backups it takes, how long they are kept and how you restore |
| Operational load | Lowest setup, highest recovery effort during an outage | Moderate; three or more Sentinel processes plus monitoring of failover events | Highest; more nodes, slot management and rebalancing | Lowest for your team; shifts cost to a service contract and to validating the provider's controls |
| What to confirm with Open WebUI's documented Redis support | Supported connection string format and persistence expectations for your version | Sentinel configuration keys and socket timeout keys for your version | Whether cluster mode is supported at all for your version | Whether the provider's endpoint, TLS and authentication match the documented settings |
Why a failover can hang the app and which settings stop it
A Redis failover does not fail cleanly by itself. Open WebUI keeps connections, retries and WebSocket sessions that were built for the old primary, and each of these can keep users waiting after the new primary is already serving traffic. The four cards below describe the symptom each path produces and the setting family to review, so you can check them against your own Open WebUI version before a failover test.
Connections held to the old primary
After a promotion, pooled connections can still point at the node that just lost its primary role. Requests sent over those sockets wait until the operating system or client gives up, so users see spinners on ordinary page loads while new connections would already succeed. Review the socket timeout, which decides how long a request may block on a dead socket. Confirm the exact Redis client settings in your Open WebUI release, since the defaults are set there and not in this page.
Scaling docsRetries that outlast user patience
When a Redis call fails, the client may retry several times with a backoff delay before it reports an error. Each retry adds wait time, so a short failover can look like a long outage to someone signing in or sending a chat message. Review the retry count, the backoff between attempts and the total time a single call may take. Test the combined worst case, because individual values that look small can add up across a chain of calls in one request.
Sentinel returns a stale primary
Clients that ask Sentinel for the current primary can receive the address of the node that was demoted, especially while Sentinels are still agreeing on the new leader. The client then writes to a read-only or unreachable node until its discovery logic refreshes. Review how often the client re-queries Sentinel and what it does after a failed write. Confirm with your Redis and Sentinel documentation how the client library handles a role change, and whether Open WebUI's connection code re-discovers the primary without a restart.
WebSocket connections that stay half open
Open WebUI uses WebSockets for live updates, and the Redis connection behind them can stop responding while the browser still shows a connected session. Users then see chats that stop streaming or status that never updates, with no error. This needs its own Redis settings, separate from the main application connection, plus health checks that detect a silent peer. Confirm in your version whether the WebSocket Redis configuration is independent, and test a failover while a browser session is open.
Configuring WebSocket Redis separately from session and state Redis
Open WebUI uses Redis for more than one job in a scaled setup. Sessions, token state and application state are request-driven, so a failed read usually produces an error for one request that the user can retry. WebSocket coordination is different because it supports long-lived connections that replicas must agree on. When a Redis failover happens, those connections can drop, and the reconnection path decides how quickly users recover. Treating both as one block of configuration hides that difference.
- Different failure cost: A short interruption to session reads may cause sign-out prompts or failed requests, while dropped WebSocket connections interrupt live chat streams.
- Different timeout needs: A timeout that suits a quick key lookup may be too aggressive for a path that must re-establish sockets after a promotion.
- Different visibility: Session data is read on each request, while WebSocket coordination must be visible across every replica that holds a user connection.
- Different owners: A platform team often runs the state Redis, and the application owners may watch the chat experience, so both teams need the same failover test results.
Check which setting controls each path in the version you run before you change any of them.
This Redis instance holds the shared state that lets any replica answer a request for any user. Session data, token validity and application state live here. Without Redis, signing out does not revoke tokens, which stay valid until they expire, by default after 4 weeks, so the shared store also acts as a security control. Its availability target should match the login and API traffic your users depend on.
- Shared session state: Every replica must read the same session data, so the Sentinel or Cluster endpoint must resolve to the current primary after a failover.
- Revocation dependency: If this instance is unavailable or returns empty data, revocation checks can fail in ways you need to test rather than assume.
- Socket timeouts: Set a socket timeout so a stalled primary produces a fast error instead of a hung request during promotion.
- Retry behavior: Confirm whether the application retries failed commands and how long a request can block before it returns an error.
- Persistence settings: Decide whether losing the most recent keys after a failover is acceptable for session data, and record that decision.
Confirm these answers with a forced failover in a test environment before go-live.
The WebSocket path connects each browser to the replica that holds its connection and lets other replicas coordinate with that connection. A session can recover with a new HTTP request, but a socket that drops during failover must reconnect, and the client must reach a replica that can see current coordination state. This path is the most sensitive to a Redis promotion, so it needs its own timeouts and its own tests.
- Dropped connections: A failover can break many open sockets at once, so measure how many reconnect attempts arrive in the same window.
- Reconnect behavior: Verify that browsers reconnect automatically and do not loop back to sign-in after the failover completes.
- Pub/sub or key visibility: Confirm whether coordination uses pub/sub messages or stored keys, because each one fails differently during a switch.
- Cross-replica delivery: Send an event through one replica and confirm that a client connected to another replica receives it.
- Separate settings: Use the WebSocket-specific Redis settings documented for your release, and do not assume they inherit the values set for the state Redis.
Repeat the reconnect and cross-replica tests after each Redis failover drill, not only at installation.
Sharing one Redis endpoint reduces the number of components, but the documentation for your release determines whether that layout is supported for both paths. Do not infer compatibility from the fact that both paths use Redis. Confirm the supported configuration in the scaling documentation and in the release notes for your version, then test the shared setup under the same failover conditions as a split one.
- Supported topology: Confirm whether the docs allow one endpoint for both uses or expect separate instances for each path.
- Key naming: Check how keys are namespaced so two deployments or two uses do not collide on a shared server.
- Timeout conflicts: A timeout tuned for quick state reads may be wrong for socket recovery, so one value may not suit both paths.
- Failover scope: A shared instance means one failover interrupts sessions and live connections at the same moment.
- Upgrade impact: Recheck the decision at each release, because the supported layout can change between versions.
Record the documented answer and the version it applies to in your change record before you deploy.
Setting up Sentinel or Cluster for Open WebUI, step by step
This sequence takes a team from confirming its Open WebUI version and scaling prerequisites to a tested Redis topology that fails over without hanging the application, with checks at each stage.
Confirm version and scaling prerequisites
Before touching Redis, confirm which Open WebUI release you run and check that the rest of the scaled setup is in place: PostgreSQL instead of SQLite, shared file storage, an external vector database and a shared secret across replicas. The scaling guide lists Redis as a shared state store for sessions, WebSocket connections and application state, so every replica must point at the same Redis service. Check the release notes for the version you plan to run, since the Redis settings you use may differ between releases. Done means you have a written list of confirmed versions and a passing login from two replicas against the same database.
Build the Redis topology in a test environment
Have your platform or database team build the Redis Sentinel or Redis Cluster topology in a non-production environment that mirrors your network layout. Sentinel needs a primary, replicas and enough Sentinel processes to reach quorum; Cluster needs its own node layout and slot distribution. Confirm with your Redis vendor or distribution which topology and client library versions you are supporting, and confirm that the Redis client Open WebUI uses supports the mode you choose. Done means that a query to Sentinel returns the current primary address, and that a write made through the primary appears on a replica.
Set Open WebUI Redis connection and timeout settings
Configure Open WebUI to reach Redis through the Sentinel or Cluster endpoints, and set an explicit socket timeout so a stalled connection during failover returns an error instead of waiting indefinitely. Confirm the exact configuration keys for your release in the Open WebUI documentation, and keep the same values on every replica. Restart the replicas in a rolling fashion and check the startup logs for a successful Redis connection. Done means each replica reports a healthy Redis connection and a sample sign-in creates a session that is visible to all replicas.
Configure WebSocket Redis separately
Treat WebSocket coordination as its own Redis configuration rather than assuming the main connection settings cover it. Confirm the WebSocket Redis keys for your Open WebUI release, point them at the same highly available topology, and apply the same timeout discipline. Check that a user with an open chat in one replica receives streamed output when the request is handled by another replica. Done means streamed responses arrive across replicas during normal operation and the WebSocket settings are documented alongside the main Redis settings.
Test failover by stopping the primary
With active test users signed in, stop the Redis primary on purpose and observe what Open WebUI does. Use a request timer or your load-test tool to measure how long a request takes to fail or succeed during the election. The goal is that requests fail fast within the timeout you set, not that they hang until a platform-level timeout fires. Record the time to new primary election as reported by Sentinel or the Cluster, and confirm the new primary address is returned to clients. Done means you have a written log of the failover window and the number of failed requests during it.
Verify sign-out, active chats and file access
During and after the failover, check the three behaviors that matter most to users. Sign out a test user and confirm the session is invalidated across all replicas, which depends on Redis being reachable; the scaling guide notes that without Redis, tokens stay valid until they expire. Confirm that an in-progress chat either resumes or shows a clear error and can be retried. Confirm that a file uploaded earlier can still be opened from every replica, since file access relies on shared storage rather than Redis. Done means each check has a recorded result for the failover window and for the period after recovery.
Document the results and the runbook
Write up the topology, the Open WebUI settings, the measured failover window and the outcome of each user-facing check. Include the exact commands used to stop the primary and to verify the new primary, and the steps to restore the original topology. Ask your platform team to confirm the monitoring alerts they will use for Redis failover events. Have a second engineer repeat the test from the runbook alone before you consider the setup ready for production. Done means a reviewer can follow the document and reproduce the test without help from the original builder.
Security and operations for a highly available Redis tier
Open WebUI keeps session state and token revocation in Redis once it runs with several replicas, so the Redis tier is part of the security boundary as well as the availability plan. The four cards below cover how the connection is authenticated and encrypted, where the nodes sit on the network, how the password is handled, and how failover is watched and rehearsed.
Authenticate and encrypt the Redis connection
Every Open WebUI replica reads and writes session state in Redis, and sign-out depends on that state. Without Redis, signing out does not revoke tokens, which then stay valid until they expire, by default after 4 weeks. Confirm in the Open WebUI documentation which TLS and authentication options the release you run supports for Redis and Sentinel connections, and test that a rejected password or certificate fails loudly instead of silently degrading.
Scaling docsIsolate the Redis nodes
Sentinel and Redis data nodes should accept connections only from the Open WebUI replicas, the Sentinels and the administrative hosts that need them. Keep the sentinel ports, replication ports and data port on a private segment, and block them from the public internet and from unrelated application namespaces. Because a compromised cache can expose live sessions, network isolation is a control you should verify with a scan from outside the allowed sources.
Handle the Redis password as a secret
The Redis password belongs in your secrets manager or the orchestrator's secret store, not in a Compose file, a Helm values file committed to Git or a shell history. Rotate it with a planned rollout that updates Open WebUI, Sentinel and the data nodes together, since a mismatch can strand replicas during a failover. Confirm which configuration keys the release reads for the Redis credential and whether it can be supplied from a file.
Monitor and rehearse failover
Alert on Sentinel failover events, replication lag, Redis connection errors from Open WebUI logs and any increase in sign-in failures after a promotion. Write a runbook that states who checks the new primary, how to confirm that replicas reconnected, and when to force a restart of stuck workers. Rehearse a controlled failover in a staging environment before relying on it, and record the observed recovery time so the runbook reflects real behavior.
Limits to confirm before you commit to a Redis failover design
Sentinel and Cluster are both workable only if the release, the application behavior and the test plan agree. The four cards below are the questions to answer in your environment and with the vendor before you commit to a design. This page gives no failover timing or user-impact figure, so treat every number you need as something to measure in your own staging setup.
Does this release support your Redis topology?
Confirm whether the Open WebUI release you plan to run accepts Sentinel and Cluster connection modes, and which settings select each one. Check this against the release you will pin, not the newest one, because connection handling changes between versions. Ask the vendor for the documented configuration keys and whether a Sentinel master name or cluster node list is required. If either mode is missing, the design changes before any infrastructure is bought.
- Latest release cited
- v0.12.3
How the app behaves on reconnect
Determine what Open WebUI does when its Redis connection drops and is re-established after a promotion. Ask whether it retries, re-resolves the new primary through Sentinel, or keeps a stale connection that only clears on restart. Your team should observe login, session and WebSocket behavior across the switch in a test cluster. Without this answer, you cannot tell whether a failover is a brief blip or a sustained outage.
What happens to streaming responses
Find out what happens to in-flight streaming model responses and WebSocket-coordinated chats when the Redis primary changes. Confirm whether a partially streamed answer is lost, retried or left hanging for the user, and whether the model request itself continues upstream. This matters most for long generations and for users on unstable networks. Record the behavior with real streams so support teams know what users will see.
Testing failover without hurting users
Plan a failover test that runs against a staging copy or a controlled window in production, with a rollback step and a named owner. Include a forced primary promotion, a network partition between the app and Redis, and a check that tokens and sessions still behave as expected after recovery. Agree in advance on what counts as a pass. Keep the test scripts, timings and outcomes as evidence for your change record.
Questions buyers ask before outsourcing Redis failover for Open WebUI
What does Redis failover work cost, and what drives the effort up or down?
DeployOpen does not publish a price list. A quote follows from the written scope, and the effort depends mainly on four things: the topology you choose (Sentinel with a primary and replicas, or Redis Cluster), the number of Redis endpoints and Open WebUI replicas that connect to them, the depth of failover testing, and how much monitoring you already have. A Sentinel setup with one primary, two replicas and a single Open WebUI deployment is a smaller job than a cluster serving several Open WebUI instances, WebSocket traffic and other applications. Ask for the quote to split one-time work (design, configuration, failover tests, runbooks) from any recurring work such as upgrades, monitoring changes or retainer support, which DeployOpen offers as a separate arrangement.
How long does a Redis Sentinel or Cluster failover engagement take?
The duration is set by the written scope rather than by a fixed template, so ask for a timeline in the quote instead of relying on a general figure. The main variables are the number of environments (usually a non-production copy before production), how many failover scenarios must be exercised, how quickly your change window can be scheduled, and whether the socket timeout and WebSocket settings need to be validated under real load. Work that depends on other teams, such as PostgreSQL or shared storage changes, can extend the schedule because those owners have to review and approve their parts.
What must our team provide before the engagement starts?
DeployOpen needs practical access and decisions before work begins. Expect to provide:
- Access to the environment where Redis, Open WebUI and the reverse proxy run, with read access to current configuration and logs
- The Redis topology, Sentinel or Cluster configuration, and the names and addresses of every endpoint Open WebUI uses
- The current Open WebUI configuration, including the Redis settings and any separate WebSocket Redis settings
- A test window in which failover can be triggered on purpose and the app can be observed
- A named owner for PostgreSQL, since sessions and application state depend on it, and a named owner for shared file storage, so the failover results can be checked against uploads and knowledge files
If any of these owners are missing, the failover tests will still run, but the team will not be able to close the findings that land in their area.
Can our internal platform team set up Redis failover without outside help?
Yes, many teams that already run Redis and Open WebUI can do the configuration themselves, provided they test the behavior rather than assuming it. The risk lies in the details: Open WebUI must reach Redis through Sentinel or Cluster discovery correctly, socket timeouts must be set so a failover does not hang requests, and WebSocket connections need their own Redis settings checked. Ask yourself whether someone on the team has already rehearsed a primary failure, read the logs to confirm the new primary was used, and written down the steps to recover. If not, the time spent learning these things during an incident is the cost to weigh against an outside engagement.
Does a fixed-scope engagement include failover testing and runbooks?
Testing and runbooks are included only when they appear in the written scope, which is agreed before work starts. Ask the engagement to name each failover scenario it will exercise, such as primary loss, Sentinel quorum loss, and a replica promotion, and the pass or fail evidence it will produce. Ask for runbook deliverables by name: the failover procedure, the rollback steps, the commands used to confirm the new primary, and the escalation path to the PostgreSQL and storage owners. Because scope drives both cost and schedule, any testing or documentation you want beyond the initial agreement should be added to the scope before the quote is accepted.
What goes wrong with Redis failover in Open WebUI, and how do we check for it?
The most common problem is a hang rather than a clean error. If the socket timeout is missing or too long, requests can wait on a dead primary while Sentinel or Cluster elects a new one, so users see stalled logins or chats. Sessions and token revocation depend on Redis, and without it signing out does not revoke tokens, which remain valid until they expire, by default after 4 weeks, so a failover that silently drops state needs checking too. To verify, run a controlled primary failure during a test window, measure how long requests block, confirm the new primary receives writes, and check that the WebSocket Redis settings point to the expected endpoints. Confirm the exact configuration keys and their behavior for your Open WebUI version in the Scaling Open WebUI guide before you change them.
How DeployOpen scopes and delivers Open WebUI Redis high availability
DeployOpen plans, builds and hands over Redis Sentinel or Redis Cluster for Open WebUI inside infrastructure you control. The work covers failover behavior, client timeouts, the separate WebSocket Redis settings and the tests that show sessions and real-time connections recover as expected. Engagements are fixed-scope, with the scope agreed in writing before work starts.
How we scope
- Confirm the Open WebUI version, replica count and whether Redis serves sessions, WebSocket coordination or both.
- Agree the Redis topology: Sentinel with replicas, or Redis Cluster, and which hosts or Kubernetes clusters run it.
- Record the failover behavior each team expects, including login, chat streaming and file upload behavior during a switch.
How we build
- Configure Open WebUI Redis connection settings, including the socket timeout, against the chosen Sentinel or Cluster topology.
- Set the WebSocket Redis configuration separately and confirm both paths point to the intended Redis services.
- Test controlled primary failovers and record how long sessions, WebSocket reconnects and token revocation take to recover.
How we hand over
- Deliver the written configuration, topology diagram, environment variable inventory and the failover test results.
- Document the runbook for planned failover, node replacement and a Redis outage, with the expected user-facing symptoms.
- Walk operations and security teams through the settings, the test evidence and the open items to confirm in your environment.
How we support
- Review the configuration again after Open WebUI upgrades, since client behavior and settings can change between releases.
- Retest failover after Redis version upgrades, topology changes or network changes that affect Sentinel or Cluster discovery.
- Ongoing support, upgrades and continuous testing are available as a retainer, scoped in writing.

