go-redis

go-redis

github.com

1

About this website

go-redis is a Redis client library for Go, providing type-safe Redis commands, connection pooling, cluster support, and distributed primitives. Maintained by the Redis team (formerly by Vladimir Mihailenco), it is the most popular Redis client for Go with over 20,300 stars as of 2026. The library offers two main APIs: the high-level Client (for single-node Redis and Redis Sentinel) and the ClusterClient (for Redis Cluster with automatic slot routing, node discovery, and failover handling). Key features include: automatic connection pooling with configurable pool size and timeouts, pipeline and TxPipeline for batching multiple commands (reducing network round-trips), pub/sub message handling, Lua script evaluation with EVALSHA caching, context-aware operations with context.Context for cancellation and timeouts, distributed locks via the redsync package (Redlock algorithm implementation), rate limiting via the redis_rate package (GCRA algorithm), universal client abstraction supporting single-node, sentinel, and cluster deployments with a single API, automatic read/write splitting for cluster topologies, TLS/SSL support with custom certificates, OpenTelemetry tracing integration, and comprehensive testing helpers for Redis mocking. The library supports all Redis commands including streams (XADD, XREAD, XGROUP), HyperLogLog, geospatial indexes (GEOADD, GEORADIUS), and Redis modules (RediSearch, RedisJSON, RedisBloom). As of 2026, go-redis version 9.x requires Go 1.18+.

Tags & Categories

Categories

Tags

Statistics

1
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!