Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/content/docs/concepts/client-features/high-availability.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: High-Availability
description: Learn how Valkey GLIDE supports high-availability features.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: This import not used in this file.


Valkey GLIDE supports high-availability features out of the box. Only minimal configurations are needed.

## Available HA Features

- Automatic topology updates.
- Connection timeout and exponential backoff for reconnecting.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note that point here mentions connection timeout, but section below is on request timeout, they are different things (and both should be mentioned in this doc).

- Command routing.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"Command routing" seems vague, maybe "Automatic MOVED/ASK redirect handling (re-routes commands during slot migrations and failovers)".

- Read strategies (Requires changing to read from replicas).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should mention AZ-affinity strategies here, read from replicas is just one of them.


### Automatic Topology Updates

GLIDE maintains a map of the cluster and automatically updates it when changes occur. For example, if a primary node fails and a replica is promoted, GLIDE detects this change and updates its topology mapping.
No additional configuration is required.

### Request Timeout

By default, GLIDE has a request timeout of 250ms. This controls how long GLIDE waits for a command to complete, including any reconnection attempts.

During failover, commands may take longer to complete due to retries. Increasing the timeout (e.g., to 1000ms) reduces the chance of false timeouts during brief disruptions.

### Reconnect Strategy

By default, GLIDE uses exponential backoff reconnect strategy. This controls how GLIDE attempts to reconnect to nodes.

For production, configure the number of retries and backoff parameters to match your failover timing.
For more on configuring reconnect strategies, see our [guide](/how-to/connections/timeouts-and-reconnect-strategy/).

### Read Strategy

Configuring clients to read from replicas is important for high availability.

By default, GLIDE clients read and write from the primary node. Changing this to read from replicas provides
two benefits: reads can continue while a primary is down and it distributes load away from primaries.

For more on configuring read strategies, see our [guide](/how-to/connections/read-strategy/).
Loading