Zero-copy speed.
Drop-in Lettuce alternative.
Zettuce replaces Netty and kernel TCP copies with a single zero-dependency C11 engine for Valkey and Redis. Transfer Valkey data directly from Host A's memory to Host B's memory over RDMA in 7.98 µs — or connect to Redis or Valkey over Linux io_uring TCP (and Unix sockets) and still beat Lettuce 7.9 by up to 2.6×.
Java 25 median RDMA round-trip (9.72 µs p99) against Valkey 9.2.0 across two hosts.
Higher single-connection throughput over RDMA than Lettuce 7.9.0 with native Netty Epoll.
Faster than Lettuce 7.9.0 even over plain TCP via 1-syscall Linux io_uring.
No Netty, no Reactor, no liburing. One C11 engine shared by Java FFM, Rust, Python, and C.
Measured on two AlmaLinux 10.2 hosts (Linux 6.12, Mellanox ConnectX-3 RoCE) against Valkey 9.2.0. Full methodology and tables.
Why switch from Lettuce?
Lettuce was built for an era before Java Panama FFM, Linux io_uring, and Valkey-over-RDMA. Zettuce keeps a clean, familiar client API while stripping away every layer between your application and the wire.
RDMA, TCP, TLS/mTLS & Unix
Use kernel-bypass RDMA with Valkey, or Linux io_uring TCP, TLS 1.2/1.3 & mTLS, dynamic credential rotation, and AF_UNIX sockets with both Valkey and Redis.
Faster than Lettuce on plain TCP
On Linux 5.6+, Zettuce links SEND + RECV into a single io_uring_enter() syscall and falls back to epoll automatically in restricted containers.
Spring Boot, Micronaut & GraalVM 25
Zero-dependency core zettuce-java plus first-class zettuce-spring (RedisTemplate & @Cacheable), zettuce-micronaut, zettuce-observability (Micrometer/OTel), and GraalVM 25 Native Image metadata.
Four languages, one engine
Java 22+ FFM, Rust, Python (METH_FASTCALL, GIL-releasing + asyncio), and C11 all execute on the exact same battle-tested C core.
Failover, Cluster scaling & ClientCache
ReadFrom replica routing, live SentinelPool failover, per-node Cluster pools & scatter-gather, RESP3 CLIENT TRACKING cache, and pluggable ZettuceCodec.
Linearizable & sanitizer-clean
Verified with Wing & Gong Jepsen chaos tests, operational server-fault suites, 100k RESP2/3 fuzzing, GraalVM native smoke tests, and strict ASan + UBSan + LSan.
Valkey & Redis support: Zettuce works with both Valkey and Redis over TCP (io_uring / epoll) and Unix domain sockets (AF_UNIX) — giving Redis users the same 1.7×–2.6× speedup over Lettuce with zero Netty dependencies. Kernel-bypass RDMA is supported with Valkey (valkey-rdma.so), as Redis does not support RDMA.
Platform support — Linux native engine (+ pure-Java dev fallback): Zettuce's native C11 engine targets Linux x86_64 and aarch64 because it talks directly to Linux-native interfaces: libibverbs/librdmacm (Valkey-over-RDMA), raw io_uring syscalls (linked SEND + RECV), epoll, and Linux AF_UNIX domain sockets. On macOS/Windows developer workstations or older-glibc Linux hosts, zettuce-java automatically falls back to a zero-dependency pure-Java TCP/Unix RESP2/RESP3 backend so local development and tests work out of the box. For production non-Linux deployments (Windows/FreeBSD), use Lettuce.
How Zettuce compares to Lettuce 7.9
Head-to-head on two physical servers against Valkey 9.2.0 (OpenJDK 25, Lettuce 7.9.0.RELEASE with native Netty 4.2.17 Epoll verified active). Every Zettuce bar uses the exact same Java API—only the transport option changes.
PING p50 latency (pipe=1)
microseconds; shorter is better
| Client | p50 latency |
|---|---|
| Zettuce Java RDMA | 7.98 µs (4.8× lower) |
| Zettuce Java TCP (io_uring) | 23.55 µs (1.6× lower) |
| Lettuce 7.9 (Epoll TCP) | 38.22 µs |
PING p99 tail latency (pipe=1)
microseconds; shorter is better
| Client | p99 latency |
|---|---|
| Zettuce Java RDMA | 9.72 µs (8.3× lower) |
| Zettuce Java TCP (io_uring) | 36.81 µs (2.2× lower) |
| Lettuce 7.9 (Epoll TCP) | 81.12 µs |
GET 64B throughput (pipe=1)
operations/sec; longer is better
| Client | ops/sec |
|---|---|
| Zettuce Java RDMA | 111,023 ops/s (4.94×) |
| Zettuce Java TCP (io_uring) | 37,562 ops/s (1.67×) |
| Lettuce 7.9 (Epoll TCP) | 22,480 ops/s |
Pipelined GET 64B throughput (pipe=64)
operations/sec; longer is better
| Client | ops/sec |
|---|---|
| Zettuce Java RDMA | 1,171,494 ops/s (4.52×) |
| Zettuce Java TCP (io_uring) | 678,387 ops/s (2.62×) |
| Lettuce 7.9 (Epoll TCP) | 259,024 ops/s |
Cyan-to-violet bars: Zettuce over RDMA. Violet-to-magenta bars: Zettuce over plain TCP (io_uring). Green bars: Lettuce 7.9.0.RELEASE over Netty 4.2.17 Epoll TCP.
Try it in your language
Pick your preferred language once—every code tab across the site and documentation remembers your choice automatically.
import ai.intellistream.zettuce.*;
import java.time.Duration;
// AUTO tries RDMA on port 6379 and falls back cleanly to TCP (io_uring / epoll) on 6380.
RdmaConnectionOptions opts = RdmaConnectionOptions.builder()
.transport(RdmaConnectionOptions.Transport.AUTO)
.tcpFallbackPort(6380)
.auth("my-secret")
.respVersion(3)
.database(0)
.clientName("orders-service")
.build();
try (ValkeyRdmaConnection conn = Zettuce.connect("10.99.99.41", 6379, opts)) {
conn.set("order:42", "confirmed");
String status = conn.get("order:42");
// Pipeline multiple commands in ONE RDMA doorbell or ONE TCP write
ValkeyRdmaBatch batch = conn.batch();
batch.get("order:42");
batch.ping();
var replies = batch.execute();
System.out.println("transport=" + conn.activeTransport() + " metrics=" + conn.metrics());
}
Zero dependencies beyond JDK 22+. Run with --enable-native-access=ALL-UNNAMED.
use zettuce::{Client, RdmaOptions};
fn main() -> zettuce::Result<()> {
// AUTO tries RDMA on 6379, falling back to Linux io_uring / epoll TCP on 6380.
let opts = RdmaOptions::auto(6380)
.with_password("my-secret")
.with_resp_version(3)
.with_client_name("orders-service");
let mut conn = Client::with_options("10.99.99.41", 6379, opts).connect()?;
conn.set("order:42", "confirmed")?;
let status = conn.get("order:42")?;
let mut batch = conn.batch()?;
batch.get("order:42")?;
batch.ping()?;
let replies = batch.execute()?;
println!("transport={:?} status={:?} metrics={:?}",
conn.active_transport(), status, conn.metrics()?);
Ok(())
}
Zero runtime crate dependencies—statically links the C11 zettuce-c engine (no separate .so required; opt-in ZETTUCE_LIB_DIR override).
from zettuce import ValkeyRdmaClient, RdmaOptions
# AUTO tries RDMA on 6379, falling back to io_uring / epoll TCP on 6380.
opts = RdmaOptions(
transport=RdmaOptions.auto(6380).transport,
tcp_fallback_port=6380,
password="my-secret",
resp_version=3,
client_name="orders-service",
)
with ValkeyRdmaClient("10.99.99.41", 6379, opts).connect() as conn:
conn.set("order:42", "confirmed")
status = conn.get("order:42")
# C-side pipelined batch (releases the GIL on every round-trip)
batch = conn.batch()
batch.get("order:42").ping()
replies = batch.execute()
print("transport=", conn.active_transport, "metrics=", conn.metrics())
Native CPython METH_FASTCALL C-extension statically linked against zettuce-c (no separate .so required), releasing the GIL + full asyncio support.
#include <stdio.h>
#include "valkey_rdma_resp.h"
int main(void) {
char err[256] = {0};
/* AUTO tries RDMA on 6379, falling back to io_uring / epoll TCP on 6380. */
valkey_rdma_engine_t *eng = valkey_rdma_engine_connect_ex(
"10.99.99.41", 6379, NULL, 1024 * 1024,
5000, 5000, 0, 50,
VALKEY_TRANSPORT_AUTO, 6380, err, sizeof(err));
if (!eng) { fprintf(stderr, "connect failed: %s\n", err); return 1; }
valkey_rdma_cmd_set(eng, "order:42", 8, "confirmed", 9, 0, 0);
const void *val = NULL;
uint32_t vlen = 0;
if (valkey_rdma_cmd_get(eng, "order:42", 8, &val, &vlen) == 1) {
printf("value=%.*s transport=%d\n",
(int)vlen, (const char *)val, valkey_rdma_engine_transport(eng));
}
valkey_rdma_engine_close(eng);
return 0;
}
Compile with cc -std=c11 -O3 -Izettuce-c/include app.c -Lzettuce-c/build -lvalkey_rdma_ffm.
- Build all four clients in one command on Linux (requires
libibverbs-dev/rdma-core-develheaders to compile from source; RDMA runtime libraries are optional if you only need TCP):git clone https://github.com/IntelliStream-DataHub/zettuce.git cd zettuce && make - Run the verification suite (C, Java, Rust, Python, 100k RESP fuzzer, Jepsen chaos, and ASan/UBSan):
make test make -C zettuce-c check-asan - Connect to Valkey or Redis over RDMA, TCP, Unix domain sockets, or
AUTO. The clients guide covers pools, Cluster, Pub/Sub, Sentinel, and metrics in every language.