Official Redis client library for Go, providing a comprehensive interface for Redis commands with automatic connection pooling.
go-redis is the official Redis client library for the Go programming language. It provides a complete, type-safe interface to interact with Redis servers, supporting all Redis commands, connection pooling, and advanced features like Pub/Sub, pipelines, and cluster mode. It solves the problem of integrating Redis into Go applications with a reliable, high-performance driver.
Go developers building applications that require Redis for caching, real-time messaging, session storage, or as a primary data store. It's particularly useful for teams deploying Redis in production with needs for clustering, monitoring, or advanced authentication.
Developers choose go-redis because it's the official, maintained client with comprehensive Redis support, excellent performance through connection pooling, and robust error handling. Its clean API, OpenTelemetry integration, and active development make it the de facto standard for Go Redis interactions.
Redis Go client
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements all Redis commands except QUIT and SYNC, ensuring full compatibility with Redis features as stated in the README's Features section.
Supports multiple credential providers, including experimental streaming tokens for dynamic authentication like Azure Entra ID, detailed in the authentication priority order and examples.
Includes automatic connection pooling, pipelining, and customizable buffer sizes (default 32KiB) for optimal throughput, with configuration examples provided.
Provides typed error checking functions for common Redis errors, such as IsLoadingError and IsAuthError, aiding in robust error management as shown in the Typed Errors section.
Offers built-in instrumentation for tracing and metrics via the redisotel package, making it easy to monitor Redis operations in distributed systems.
The streaming credentials provider is marked as experimental, which may lead to instability or API changes in future releases, as noted in the authentication section.
RESP3 structures for RediSearch commands are not final, requiring the use of RawResult() and RawVal() methods and complicating code for these advanced features, as admitted in the README.
Advanced setups, such as custom buffer sizes, multiple authentication providers, or disabling client identity, require careful configuration and understanding of numerous options, which can be overwhelming.
The library has deprecations like the typo in DisableIndentity and plans for V10 changes, which could affect long-term maintenance and require code updates.