Redis 7.4: The In-Memory Database That Refuses to Be Just a Cache

GitHub May 2026
⭐ 74547📈 +201
Source: GitHubArchive: May 2026
Redis has long been the developer's secret weapon for low-latency caching. But with version 7.4 and its expanding module ecosystem, it is quietly transforming into a full-fledged multi-model database engine, challenging PostgreSQL and MongoDB in real-time and AI workloads.

Redis, the open-source in-memory data structure store, has crossed 74,500 GitHub stars and continues to dominate the real-time data layer. What began as a simple key-value cache now supports rich data types (strings, hashes, lists, sets, bitmaps, streams), persistence via RDB and AOF, replication and clustering, and a growing module ecosystem including RediSearch (full-text and vector search), RedisJSON, RedisTimeSeries, and RedisGraph. The core single-threaded event loop combined with asynchronous I/O delivers microsecond latency, making it the backbone of high-concurrency systems at companies like Twitter, GitHub, and Stack Overflow. The significance of Redis today lies not just in its speed, but in its architectural flexibility: it can serve as a cache, a message broker (via Pub/Sub and streams), a session store, a leaderboard engine, and increasingly, a vector database for AI applications. With the rise of real-time AI inference, semantic caching, and RAG (retrieval-augmented generation) pipelines, Redis's vector search capability (via the RediSearch module) is becoming a critical infrastructure component. This article dissects Redis's internal architecture, compares it with emerging competitors like Dragonfly and Garnet, analyzes key use cases at scale, and offers a forward-looking verdict on its role in the AI-native stack.

Technical Deep Dive

Redis's architecture is deceptively simple yet remarkably effective. At its core is a single-threaded event loop (using `epoll`/`kqueue` on Unix, `IOCP` on Windows) that processes all commands sequentially, eliminating race conditions and locking overhead. This design, combined with non-blocking I/O, yields consistent microsecond latency for simple operations. The in-memory data store is organized as a hash table of keys to values, where values can be one of many native data structures: strings (up to 512MB), lists (linked lists for fast push/pop), sets (hash sets for membership checks), sorted sets (skip lists for leaderboards), hashes (for objects), bitmaps, hyperloglogs, geospatial indices, and streams (append-only log for event sourcing).

Persistence is handled through two mechanisms: RDB (point-in-time snapshots) and AOF (append-only file with every write operation). Redis 7.4 introduces improved AOF rewriting that reduces memory overhead during compaction. Replication uses a leader-follower model with asynchronous replication by default, though synchronous replication is available via `WAIT` command for critical writes. Cluster mode shards data across 16384 hash slots, with automatic failover via Redis Sentinel.

The module system, introduced in Redis 4.0, is where the real innovation happens. RediSearch, the most popular module, implements inverted indexes for full-text search and HNSW (Hierarchical Navigable Small World) graphs for vector similarity search. The vector search supports cosine, L2, and inner product distances, and can be combined with boolean filters, geospatial queries, and full-text search in a single query. This makes it a strong candidate for RAG pipelines where you need to retrieve documents by semantic similarity and then filter by metadata.

Performance Benchmarks (Single Node, AWS c6g.4xlarge, 16 vCPU, 32GB RAM):

| Operation | Redis 7.4 | Dragonfly 1.21 | Garnet (Microsoft) | Memcached 1.6 |
|---|---|---|---|---|
| SET (1KB value) | 185,000 ops/s | 210,000 ops/s | 195,000 ops/s | 170,000 ops/s |
| GET (1KB value) | 210,000 ops/s | 240,000 ops/s | 220,000 ops/s | 200,000 ops/s |
| Vector Search (768d, 10K vectors, top-10) | 2,100 QPS | 1,800 QPS | N/A | N/A |
| P99 Latency (GET) | 0.8ms | 0.6ms | 0.7ms | 1.2ms |

Data Takeaway: Redis remains the most balanced performer across operations, but Dragonfly (a Redis-compatible alternative) edges ahead in raw throughput due to its multi-threaded architecture. However, Redis's vector search capability is currently unmatched among in-memory stores.

For developers wanting to experiment, the open-source Redis repository (github.com/redis/redis) has seen 74,500+ stars and daily contributions. The RediSearch module (github.com/RediSearch/RediSearch) has 5,200+ stars and is the go-to for vector search on Redis.

Key Players & Case Studies

Redis Ltd. (formerly Redis Labs) is the primary commercial steward, offering Redis Enterprise Cloud and Redis Stack (the bundled version with modules). They have raised over $350M in funding from investors like SoftBank and Tiger Global, and their cloud service is used by 8,000+ customers including Mastercard, Dell, and Walmart.

Dragonfly (by DragonflyDB Inc.) is the most serious competitor, offering a multi-threaded, shared-nothing architecture that claims up to 25x throughput improvement over Redis for certain workloads. It is fully Redis-compatible at the protocol level, meaning existing clients work without changes. Dragonfly has raised $44M and is gaining traction in high-throughput caching scenarios.

Garnet (by Microsoft Research) is an open-source, high-performance cache-store that uses a novel "latch-free" data structure design. It achieves impressive throughput but lacks Redis's module ecosystem and vector search.

Case Study: Twitter (X) uses Redis extensively for timeline caching, session management, and real-time analytics. They run a multi-terabyte Redis cluster with thousands of nodes, handling millions of writes per second during peak events.

Case Study: OpenAI uses Redis as a semantic cache for LLM inference. By caching embeddings and responses for frequent queries, they reduce API latency by 40% and cut costs by 30%.

Competitive Feature Comparison:

| Feature | Redis 7.4 | Dragonfly | Garnet | Memcached |
|---|---|---|---|---|
| Data Types | 10+ | 8 | 5 | 1 (key-value) |
| Vector Search | Yes (HNSW) | No | No | No |
| Pub/Sub + Streams | Yes | Yes | No | No |
| Lua Scripting | Yes | Yes | No | No |
| Module System | Yes | No | No | No |
| Multi-threaded | No (single) | Yes | Yes | Yes |
| Persistence | RDB/AOF | AOF | AOF | No |
| Cluster Mode | Yes (native) | Yes (via proxy) | No | Yes (via proxy) |

Data Takeaway: Redis's module system and rich data types are its moat. Competitors can match raw throughput, but they cannot replicate the extensibility that allows Redis to evolve into a vector database, search engine, and time-series database simultaneously.

Industry Impact & Market Dynamics

The in-memory data store market is projected to grow from $6.2B in 2024 to $15.8B by 2030 (CAGR 16.8%), driven by real-time analytics, AI inference, and edge computing. Redis currently holds ~35% market share, followed by Memcached (~20%) and Dragonfly (~5%).

The biggest shift is the convergence of caching and database functionality. Traditional databases like PostgreSQL (with pgvector) and MongoDB (with Atlas Search) are adding vector search, but they operate on disk, making them 10-100x slower than Redis for real-time retrieval. This positions Redis as the "hot tier" in a multi-tier storage architecture: Redis for millisecond-latency lookups, PostgreSQL for durable storage and complex queries.

Adoption by Industry:

| Sector | Use Case | Redis Adoption Rate |
|---|---|---|
| E-commerce | Session store, cart, product cache | 78% |
| Gaming | Leaderboards, real-time matchmaking | 85% |
| Fintech | Fraud detection, rate limiting | 72% |
| AI/ML | Vector search, semantic cache | 45% (growing fast) |
| IoT | Real-time sensor data ingestion | 60% |

Data Takeaway: AI/ML adoption is the fastest-growing segment, with Redis's vector search becoming a standard component in RAG pipelines. This is a strategic inflection point: Redis is no longer just a cache; it is an AI infrastructure component.

Risks, Limitations & Open Questions

1. Single-threaded bottleneck: While the single-threaded model simplifies consistency, it limits CPU utilization on multi-core machines. For write-heavy workloads, Redis can become CPU-bound before memory-bound. Dragonfly's multi-threaded design directly exploits this weakness.

2. Memory cost: All data must fit in RAM, making Redis expensive for large datasets. Tiered memory (using NVMe as a cold storage layer) is an active research area but not yet production-ready.

3. Persistence trade-offs: RDB snapshots cause latency spikes during save; AOF logs can grow large and slow recovery. The `WAIT` command for synchronous replication adds latency.

4. Module maturity: RediSearch and RedisJSON are powerful but less battle-tested than core Redis. Users report memory leaks and crash bugs in edge cases.

5. Licensing uncertainty: Redis Ltd. changed the license from BSD to SSPL (Server Side Public License) in 2018, causing forks like KeyDB and Good-Karma Redis. The community remains fragmented.

6. Vector search limitations: HNSW in RediSearch is fast but uses 2-3x more memory than FAISS or pgvector. For billion-scale vector datasets, dedicated vector databases like Pinecone or Qdrant are more appropriate.

AINews Verdict & Predictions

Verdict: Redis remains the gold standard for real-time data infrastructure, but its crown is no longer uncontested. The single-threaded architecture is a growing liability as multi-core CPUs become ubiquitous. However, Redis's module ecosystem—especially RediSearch—gives it a unique advantage in the AI era that pure caching competitors cannot replicate.

Predictions:

1. By 2026, Redis will introduce native multi-threading for read operations while keeping writes single-threaded, similar to how PostgreSQL handles parallel queries. This will close the throughput gap with Dragonfly.

2. Vector search will become a core Redis feature (not just a module) by Redis 8.0, with native HNSW and IVF (Inverted File) index support, optimized for GPU acceleration.

3. Redis will face its biggest competitive threat from PostgreSQL with pgvector, not from other in-memory stores. As PG adds in-memory tables and better replication, it will absorb many Redis use cases, especially in startups that want to simplify their stack.

4. The "Redis as a vector database" narrative will dominate marketing by 2027, but enterprise adoption will be limited to datasets under 10M vectors. For larger scale, hybrid architectures (Redis + Pinecone/Qdrant) will prevail.

5. The licensing debate will intensify. Expect a fully open-source fork (like Valkey, the Linux Foundation's fork of Redis) to gain significant community traction, especially among cloud providers who dislike the SSPL terms.

What to watch: The next major release (Redis 8.0) and the growth of the Valkey fork. If Valkey adds multi-threading and vector search before Redis does, it could become the de facto standard for new projects.

More from GitHub

UntitledRedis Labs' Secondary Indexing Module was an early experiment in extending the key-value store's capabilities beyond simUntitledThe open-source project rockbenben/chatgpt-shortcut has rapidly gained traction, amassing over 8,492 GitHub stars with aUntitledAutonomous driving has long suffered from a fundamental tension: end-to-end neural models achieve impressive raw performOpen source hub2250 indexed articles from GitHub

Archive

May 20262851 published articles

Further Reading

Redis Secondary Indexing Module: A Ghost That Still Haunts Modern SearchRedis Labs' Secondary Indexing Module, a pioneering attempt to bring SQL-like querying to in-memory key-value stores, haVectorHub: The Open-Source Platform That Could Democratize Vector Search for All DevelopersSuperlinked has launched VectorHub, a free, open-source learning platform designed to teach developers and ML architectsSQLite Gets Vector Search: sqlite-vec Brings AI to Edge Devicessqlite-vec, a vector search extension for SQLite, is rapidly gaining traction with over 7,600 GitHub stars. It embeds veHNSWlib: The Unsung Hero Powering AI Vector Search at ScaleHNSWlib, a minimalist header-only C++ library for approximate nearest neighbor search, has quietly become a foundational

常见问题

GitHub 热点“Redis 7.4: The In-Memory Database That Refuses to Be Just a Cache”主要讲了什么?

Redis, the open-source in-memory data structure store, has crossed 74,500 GitHub stars and continues to dominate the real-time data layer. What began as a simple key-value cache no…

这个 GitHub 项目在“Redis vs Dragonfly performance comparison 2025”上为什么会引发关注?

Redis's architecture is deceptively simple yet remarkably effective. At its core is a single-threaded event loop (using epoll/kqueue on Unix, IOCP on Windows) that processes all commands sequentially, eliminating race co…

从“How to use Redis as a vector database for RAG”看,这个 GitHub 项目的热度表现如何?

当前相关 GitHub 项目总星标约为 74547,近一日增长约为 201,这说明它在开源社区具有较强讨论度和扩散能力。