# redis/rueidis

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/redis-rueidis).**

2,899 stars · 230 forks · Go · apache-2.0

## Links

- GitHub: https://github.com/redis/rueidis
- awesome-repositories: https://awesome-repositories.com/repository/redis-rueidis.md

## Topics

`cache` `client-side-caching` `distributed` `generics` `go` `golang` `lock` `rdma` `redis` `redis-client` `resp3` `resp3-client`

## Description

Rueidis is a high-performance Redis client library for Go that provides a type-safe and asynchronous interface for interacting with Redis servers. It includes a full implementation of the Redis serialization protocol and a dedicated connection manager to handle pooling, multiplexing, and automatic pipelining.

The library is distinguished by its support for RDMA connectivity to reduce latency and CPU overhead. It features a distributed lock manager that implements majority-based locking and optimistic concurrency control, as well as client-side caching with invalidation signals to minimize network round trips.

The project covers a wide range of capabilities, including the management of complex data structures such as Bloom filters, bitmaps, and JSON documents. It provides integrated support for Pub/Sub messaging, indexed object search, and reliability features like exponential backoff retries and cache stampede prevention.

Observability is integrated through command performance tracing, network instrumentation, and cache monitoring.

## Tags

### Data & Databases

- [Redis Clients](https://awesome-repositories.com/f/data-databases/redis-clients.md) — Provides a high-performance Redis client with connection pooling, multiplexing, and automatic pipelining.
- [RDMA Clients](https://awesome-repositories.com/f/data-databases/redis-clients/rdma-clients.md) — Provides a high-performance Redis client with specialized RDMA connectivity to minimize latency and CPU overhead.
- [Client-Side Cache Invalidations](https://awesome-repositories.com/f/data-databases/client-side-cache-invalidations.md) — Implements client-side caching that synchronizes state using invalidation notifications to minimize network round trips.
- [Command Pipelining](https://awesome-repositories.com/f/data-databases/command-pipelining.md) — Groups concurrent non-blocking commands into a single network request to increase throughput. ([source](https://github.com/redis/rueidis/blob/main/rueidis.go))
- [Redis](https://awesome-repositories.com/f/data-databases/connection-managers/redis.md) — Manages the lifecycle of Redis connections, including pooling, multiplexing, and pipelining.
- [Protocol Implementations](https://awesome-repositories.com/f/data-databases/connection-managers/redis/protocol-implementations.md) — Implements the full Redis serialization protocol for high-performance message encoding and decoding.
- [Connection Pools](https://awesome-repositories.com/f/data-databases/connection-pools.md) — Maintains a pool of reusable database connections to limit resource usage and reduce overhead. ([source](https://github.com/redis/rueidis/blob/main/pool_test.go))
- [Protocol Serialization Encoders](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-transformation/data-encoding-serialization/data-encoders/byte-oriented-block-encoding/protocol-serialization-encoders.md) — Implements the encoding of complex data structures into compliant byte sequences for Redis transmission. ([source](https://github.com/redis/rueidis/blob/main/resp_test.go))
- [High-Level Query APIs](https://awesome-repositories.com/f/data-databases/high-level-query-apis.md) — Provides a high-level API adapter that simplifies command construction and reduces code verbosity for Redis clients. ([source](https://github.com/redis/rueidis/tree/main/rueidiscompat))
- [Local Caching Layers](https://awesome-repositories.com/f/data-databases/local-first-storage/local-caching-layers.md) — Stores server responses in local memory-resident caches to reduce network latency and server load. ([source](https://github.com/redis/rueidis/blob/main/README.md))
- [Data Structure Operations](https://awesome-repositories.com/f/data-databases/redis-clients/data-structure-operations.md) — Manages complex data types including Bloom filters, bitmaps, and JSON documents for efficient search.
- [PubSub Interfaces](https://awesome-repositories.com/f/data-databases/redis-clients/pubsub-interfaces.md) — Implements event-driven interfaces for publishing and subscribing to real-time message channels.
- [Bitmap-Based Membership Tracking](https://awesome-repositories.com/f/data-databases/bitmap-based-membership-tracking.md) — Provides bitmap manipulation capabilities to track boolean states and efficient set memberships. ([source](https://github.com/redis/rueidis/blob/main/bitmap_test.go))
- [Lua Scripting](https://awesome-repositories.com/f/data-databases/caching-and-locking/atomic-task-locks/lua-scripting.md) — Supports the execution of server-side Lua scripts for atomic state transitions and performance optimization. ([source](https://github.com/redis/rueidis/blob/main/lua_test.go))
- [Stampede Mitigation](https://awesome-repositories.com/f/data-databases/concurrent-write-optimizations/concurrent-caches/stampede-mitigation.md) — Implements request coordination during cache misses to prevent redundant backend load (cache stampede). ([source](https://github.com/redis/rueidis/blob/main/rueidisaside))
- [Command Buffering](https://awesome-repositories.com/f/data-databases/connection-establishment/command-buffering.md) — Implements a flow buffer to queue database commands for managed write sequences and response handling. ([source](https://github.com/redis/rueidis/blob/main/flowbuffer.go))
- [JSON Handling Utilities](https://awesome-repositories.com/f/data-databases/json-handling-utilities.md) — Supports storing and retrieving raw bytes and JSON strings without unnecessary data conversions. ([source](https://github.com/redis/rueidis#readme))
- [Optimistic Locking](https://awesome-repositories.com/f/data-databases/optimistic-locking.md) — Implements optimistic locking using WATCH/MULTI/EXEC to prevent lost updates during concurrent modifications.
- [Probabilistic Membership Filters](https://awesome-repositories.com/f/data-databases/probabilistic-data-structures/probabilistic-membership-filters.md) — Offers memory-efficient probabilistic filters for membership queries and sliding window tracking. ([source](https://github.com/redis/rueidis/tree/main/rueidisprob))
- [Bloom Filters](https://awesome-repositories.com/f/data-databases/query-filters/bloom-filters.md) — Provides space-efficient Bloom filters for probabilistic membership testing. ([source](https://github.com/redis/rueidis/blob/main/rueidisprob))
- [Counting](https://awesome-repositories.com/f/data-databases/query-filters/bloom-filters/counting.md) — Implements counting Bloom filters that track element frequency and support element removal. ([source](https://github.com/redis/rueidis/blob/main/rueidisprob))
- [Sliding Window](https://awesome-repositories.com/f/data-databases/query-filters/bloom-filters/sliding-window.md) — Provides sliding window Bloom filters to monitor item membership over a specific duration. ([source](https://github.com/redis/rueidis/blob/main/rueidisprob))
- [Read Replicas](https://awesome-repositories.com/f/data-databases/read-replicas.md) — Includes logic to route read operations across replica nodes to distribute load away from the primary node. ([source](https://github.com/redis/rueidis/blob/main/standalone.go))
- [Object-to-Redis Mappers](https://awesome-repositories.com/f/data-databases/redis-clients/object-to-redis-mappers.md) — Implements object mapping to persist application structures as Redis hashes or JSON documents. ([source](https://github.com/redis/rueidis/blob/main/om))
- [Search Indexing](https://awesome-repositories.com/f/data-databases/search-indexing.md) — Provides indexing capabilities to enable efficient querying and retrieval of object repositories. ([source](https://github.com/redis/rueidis/blob/main/om))

### DevOps & Infrastructure

- [Distributed Task Coordination](https://awesome-repositories.com/f/devops-infrastructure/distributed-lock-coordination/distributed-task-coordination.md) — Coordinates shared resource access across processes using majority-based locks and session management. ([source](https://github.com/redis/rueidis/tree/main/rueidislock))
- [Distributed Locks](https://awesome-repositories.com/f/devops-infrastructure/distributed-locks.md) — Provides a distributed lock manager implementing majority-based locking and optimistic concurrency control.
- [Response Body Streaming](https://awesome-repositories.com/f/devops-infrastructure/file-uploaders/large-file-optimization/response-body-streaming.md) — Processes large server responses as streams to avoid high memory allocation for the response body.

### Networking & Communication

- [Publish-Subscribe Messaging](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-services/message-broker-infrastructure/publish-subscribe-messaging.md) — Implements a publish-subscribe model to send messages to specified channels for all active subscribers. ([source](https://github.com/redis/rueidis/blob/main/pubsub_test.go))
- [Connection Multiplexing](https://awesome-repositories.com/f/networking-communication/connection-multiplexing.md) — Distributes requests across multiple pipeline connections to optimize throughput and reduce contention. ([source](https://github.com/redis/rueidis/blob/main/mux.go))
- [Connection Pooling](https://awesome-repositories.com/f/networking-communication/connection-pooling.md) — Manages a pool of multiplexed connections to distribute requests and optimize network throughput.
- [High-Performance Networking](https://awesome-repositories.com/f/networking-communication/high-performance-networking.md) — Reduces latency and CPU overhead through RDMA connectivity and optimized binary protocol parsing.
- [Protocol Parsers](https://awesome-repositories.com/f/networking-communication/protocol-clients/protocol-parsers.md) — Implements a parser to decode Redis Serialization Protocol (RESP) messages from byte streams into Go data types. ([source](https://github.com/redis/rueidis/blob/main/resp_test.go))
- [Pub-Sub Messaging](https://awesome-repositories.com/f/networking-communication/pub-sub-messaging.md) — Implements a high-performance pub-sub messaging system for decoupling message producers and consumers. ([source](https://github.com/redis/rueidis/blob/main/README.md))
- [RDMA Networking](https://awesome-repositories.com/f/networking-communication/rdma-networking.md) — Utilizes Remote Direct Memory Access for high-performance transport to reduce latency and CPU overhead.
- [RDMA Protocol Implementations](https://awesome-repositories.com/f/networking-communication/rdma-networking/rdma-protocol-implementations.md) — Provides high-performance connectivity using Remote Direct Memory Access to reduce latency and CPU overhead. ([source](https://github.com/redis/rueidis/tree/main/rueidisrdma))
- [Response Streaming](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/http-client-libraries/http-client-utilities/response-streaming.md) — Enables incremental reading of server response streams to optimize memory usage during large data transfers. ([source](https://github.com/redis/rueidis/blob/main/mux.go))
- [PubSub Channel Subscriptions](https://awesome-repositories.com/f/networking-communication/pubsub-channel-subscriptions.md) — A mechanism to listen for messages on specific channels and trigger callbacks upon arrival. ([source](https://github.com/redis/rueidis/blob/main/pubsub_test.go))
- [PubSub Channel Unsubscriptions](https://awesome-repositories.com/f/networking-communication/pubsub-channel-unsubscriptions.md) — The ability to stop listening for messages on a specific channel to cease receiving updates. ([source](https://github.com/redis/rueidis/blob/main/pubsub_test.go))

### Security & Cryptography

- [Majority-Based Distributed Locks](https://awesome-repositories.com/f/security-cryptography/majority-based-distributed-locks.md) — Provides a distributed lock manager that requires a majority of keys to coordinate access to shared resources.
- [Transactional Row Locking](https://awesome-repositories.com/f/security-cryptography/row-level-security/concurrency-locking/transactional-row-locking.md) — Provides transactional row locking through dedicated connections to prevent command interleaving during optimistic locking sequences. ([source](https://github.com/redis/rueidis/blob/main/README.md))

### Software Engineering & Architecture

- [Request Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/command-pipelines/request-pipelines.md) — Supports manual batching of multiple database commands into a single network request. ([source](https://github.com/redis/rueidis#readme))
- [Cache Aside Patterns](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/design-patterns/cache-aside-patterns.md) — Implements a cache-aside pattern with proactive invalidation to minimize redundant network calls. ([source](https://github.com/redis/rueidis/blob/main/README.md))
- [Idempotent Operation Retries](https://awesome-repositories.com/f/software-engineering-architecture/idempotent-operation-retries.md) — Implements automatic retries for read-only or idempotent write commands upon failure until a specified timeout. ([source](https://github.com/redis/rueidis#readme))
- [Ring Buffers](https://awesome-repositories.com/f/software-engineering-architecture/queue-implementations/ring-buffers.md) — Uses a circular ring-buffer for efficient queuing of requests and retrieval of command results.

### Web Development

- [Client-Side Caching](https://awesome-repositories.com/f/web-development/state-synchronization/client-side-caching.md) — Reduces network round trips by mirroring server responses locally and using invalidation signals.
- [Request Deduplication](https://awesome-repositories.com/f/web-development/request-deduplication.md) — Suppresses duplicate concurrent requests for the same resource to prevent redundant processing. ([source](https://github.com/redis/rueidis/blob/main/singleflight.go))

### Part of an Awesome List

- [Cache Operation Tracing](https://awesome-repositories.com/f/awesome-lists/devops/monitoring-and-tracing/cache-operation-tracing.md) — Provides telemetry spans to trace the performance of key-value store operations. ([source](https://github.com/redis/rueidis/tree/main/rueidisotel))

### Programming Languages & Runtimes

- [Exponential Backoff Retries](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/background-task-management/background-task-retry-policies/asynchronous-task-retries/exponential-backoff-retries.md) — Automatically reapplies failed commands using an exponential backoff strategy to prevent server overloading. ([source](https://github.com/redis/rueidis/blob/main/retry.go))

### System Administration & Monitoring

- [Cache Efficiency Metrics](https://awesome-repositories.com/f/system-administration-monitoring/cache-efficiency-metrics.md) — Tracks cache hit/miss rates and efficiency metrics for local client-side caching. ([source](https://github.com/redis/rueidis/blob/main/rueidisotel))
- [Command Performance Tracing](https://awesome-repositories.com/f/system-administration-monitoring/command-performance-tracing.md) — Uses histograms to measure command execution durations and error rates to identify slow queries. ([source](https://github.com/redis/rueidis/blob/main/rueidisotel))
