What's new in Valkey 9.0? Discover new features and improvements. Read the announcement.

Client Libraries

Valkey clients connect your application to a Valkey server. The libraries below are maintained by the open-source community; those marked Recommended are officially supported.

Advanced Features Overview

Advanced Features Overview

  1. Read from Replica - The ability to read data from a replica node, which can be useful for load balancing and reducing the load on the primary node. This feature is particularly important in read-heavy applications.

  2. Smart Backoff to Prevent Connection Storm - A strategy used to prevent connection storms by progressively updating the wait time between retries when attempting to reconnect to a Valkey server. This helps to reduce the load on the server during topology updates, periods of high demand or network instability.

  3. PubSub State Restoration - The ability to restore the state of Pub/Sub (publish/subscribe) channels after a client reconnects. This feature ensures that clients can continue receiving messages after disconnections or topology updates such as adding or removing shards, for both legacy Pub/Sub and sharded Pub/Sub. The client will automatically resubscribe the connections to the new node. The advantage is that the application code is simplified, and doesn’t have to take care of resubscribing to new nodes during reconnects.

  4. Cluster Scan - This feature ensures that the user experience and guarantees for scanning a cluster are identical to those for scanning a single node. The SCAN function operates as a cursor-based iterator. With each command, the server provides an updated cursor, which must be used as the cursor argument in subsequent calls. A complete iteration with SCAN retrieves all elements present in the collection from start to finish. If an element exists in the collection at the beginning and remains until the end of the iteration, SCAN will return it. Conversely, any element removed before the iteration begins and not re-added during the process will not be returned by SCAN. A client supporting this feature ensures the scan iterator remains valid even during failovers or cluster scaling (in or out) during the SCAN operation.

  5. Latency-Based Read from Replica - This feature enables reading data from the nearest replica, i.e., the replica that offers the best latency. It supports complex deployments where replicas are distributed across various distances, including different geographical regions, to ensure data is read from the closest replica, thereby minimizing latency.

  6. AZ-Based Read from Replica - This feature enables reading data from replicas within the same Availability Zone (AZ). When running Valkey in a cloud environment across multiple AZs, it is preferable to keep traffic localized within an AZ to reduce costs and latency. By reading from replicas in the same AZ as the client, you can optimize performance and minimize cross-AZ data transfer charges. For more detailed information about this feature and its implementation, please refer to this link.

  7. Client Side Caching - Valkey client-side caching is a feature that allows clients to cache the results of Valkey queries on the client-side, reducing the need for frequent communication with the Valkey server. This can significantly improve application performance by lowering latency, reducing the network usage and cost and reducing the load on the Valkey server.

  8. CLIENT CAPA redirect Support - The CLIENT CAPA redirect feature was introduced in Valkey 8 to facilitate seamless upgrades without causing errors in standalone mode. When enabled, this feature allows the replica to redirect data access commands (both read and write operations) to the primary instance. This ensures uninterrupted service during the upgrade process. For more detailed information about this feature, please refer to this link.

  9. Persistent Connection Pool - This feature enables the Valkey client to maintain a pool of persistent connections to the Valkey server, improving performance and reducing overhead. Instead of establishing a new connection for each request, the client can reuse existing connections from the pool, minimizing the time and resources required for connection setup.

C#

Valkey GLIDE C#

Valkey GLIDE C# is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java, node.js and Python.

dotnet add package Valkey.Glide
Version
v1.0.0 · 2026-04-18
License
Apache-2.0
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

Go

Valkey GLIDE Go

Valkey GLIDE Go is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java, node.js and Python.

go get github.com/valkey-io/valkey-glide/go
Version
v2.1.1 · 2025-10-08
License
Apache-2.0
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

valkey-go

A fast Golang Valkey client that does auto pipelining and supports server-assisted client-side caching.

go get github.com/valkey-io/valkey-go
Version
1.0.67 · 2025-10-12
License
Apache-2.0
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

Java

redisson

Redisson is a Valkey & Redis Java client and Real-Time Data Platform. Implements over 50 Valkey based Java objects and services. Integrated with Spring, Hibernate, MyBatis, JCache, Quarkus, Micronaut, Helidon.

Maven
<dependency>
  <groupId>org.redisson</groupId>
  <artifactId>redisson</artifactId>
  <version>LATEST</version>
</dependency>
Gradle
implementation 'org.redisson:redisson:+'
Version
v3.48.0 · 2025-05-27
License
Apache-2.0
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

Valkey GLIDE Java

Valkey GLIDE Java is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java, node.js and Python.

Maven
//Choose the appropriate classifier 
 <dependency>
  <groupId>io.valkey</groupId>
  <artifactId>valkey-glide</artifactId>
  <classifier>osx-aarch_64 OR linux-aarch_64 OR linux-x86_64</classifier> 
  <version>[1.0.0,2.0.0)</version>
</dependency>
Gradle
//Choose the appropriate classifier 
 implementation group: 'io.valkey', name: 'valkey-glide', version: '1.+', classifier: 'osx-aarch_64 OR linux-aarch_64 OR linux-x86_64'
Version
v2.1.1 · 2025-10-08
License
Apache-2.0
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

valkey-java

valkey-java is Valkey's Java client, dedicated to maintaining simplicity and high performance.

Maven
<dependency>
  <groupId>io.valkey</groupId>
  <artifactId>valkey-java</artifactId>
  <version>LATEST</version>
</dependency>
Gradle
implementation 'io.valkey:valkey-java:+'
Version
v5.3.0 · 2024-08-08
License
MIT
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

node.js

iovalkey

A robust, performance-focused and full-featured Redis client for Node.js.

npm install iovalkey
Version
v0.3.1 · 2025-03-10
License
MIT
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

Valkey GLIDE Node.js

Valkey GLIDE Node.js is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java, node.js and Python.

npm install @valkey/valkey-glide
Version
v2.1.1 · 2025-10-08
License
Apache-2.0
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

PHP

phpredis

A PHP extension for Redis, offering high performance and a native API.

pecl install redis
Version
6.1.0 · 2024-10-05
License
PHP-3.01
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

predis

A flexible and feature-complete Redis client for PHP.

composer require predis/predis
Version
v2.3.0 · 2024-11-21
License
MIT
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

Python

Valkey GLIDE Python

Valkey GLIDE Python is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java, node.js and Python.

pip install valkey-glide
Version
v2.1.1 · 2025-10-08
License
Apache-2.0
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

valkey-py

The Python interface to the Valkey key-value store.

pip install valkey
Version
6.1.0 · 2025-02-11
License
MIT
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

Swift

valkey-swift

Swift client for Valkey.

swift package add-dependency https://github.com/valkey-io/valkey-swift
Version
v1.0.0 · 2026-02-24
License
Apache-2.0
  • Read from replica
  • Smart backoff
  • Pub/Sub restoration
  • Cluster scan
  • Latency-based read
  • AZ-based read
  • Client-side caching
  • CLIENT CAPA redirect
  • Persistent conn pool

Feature Comparison

Client Language Read from replicaSmart backoffPub/Sub restorationCluster scanLatency-based readAZ-based readClient-side cachingCLIENT CAPA redirectPersistent conn pool
Valkey GLIDE C# Website ↗ C#
Valkey GLIDE Go Website ↗ Go
valkey-go Go
redisson Java
Valkey GLIDE Java Website ↗ Java
valkey-java Java
iovalkey node.js
Valkey GLIDE Node.js Website ↗ node.js
phpredis PHP
predis PHP
Valkey GLIDE Python Website ↗ Python
valkey-py Python
valkey-swift Swift