This document serves as both a quick start guide to Redis and a detailed resource for building it from source.
- New to Redis? Start with What is Redis and Getting Started
- Ready to build from source? Jump to Build Redis from Source
- Want to contribute? See the Code contributions section and CONTRIBUTING.md
- Looking for detailed documentation? Navigate to redis.io/docs
- What is Redis?
- Why choose Redis?
- What is Redis Open Source?
- Getting started
- Redis data types, processing engines, and capabilities
- Community
- Build Redis from source
- Build and run Redis with all data structures - Ubuntu 20.04 (Focal)
- Build and run Redis with all data structures - Ubuntu 22.04 (Jammy)
- Build and run Redis with all data structures - Ubuntu 24.04 (Noble)
- Build and run Redis with all data structures - Debian 11 (Bullseye) / 12 (Bookworm)
- Build and run Redis with all data structures - AlmaLinux 8.10 / Rocky Linux 8.10
- Build and run Redis with all data structures - AlmaLinux 9.5 / Rocky Linux 9.5
- Build and run Redis with all data structures - macOS 13 (Ventura) and macOS 14 (Sonoma)
- Build and run Redis with all data structures - macOS 15 (Sequoia)
- Building Redis - flags and general notes
- Fixing build problems with dependencies or cached build options
- Fixing problems building 32 bit binaries
- Allocator
- Monotonic clock
- Verbose build
- Running Redis with TLS
- Code contributions
- Redis Trademarks
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
Redis excels in various applications, including:
- Caching: Supports multiple eviction policies, key expiration, and hash-field expiration.
- Distributed Session Store: Offers flexible session data modeling (string, JSON, hash).
- Data Structure Server: Provides low-level data structures (strings, lists, sets, hashes, sorted sets, JSON, etc.) with high-level semantics (counters, queues, leaderboards, rate limiters) and supports transactions & scripting.
- NoSQL Data Store: Key-value, document, and time series data storage.
- Search and Query Engine: Indexing for hash/JSON documents, supporting vector search, full-text search, geospatial queries, ranking, and aggregations via Redis Query Engine.
- Event Store & Message Broker: Implements queues (lists), priority queues (sorted sets), event deduplication (sets), streams, and pub/sub with probabilistic stream processing capabilities.
- Vector Store for GenAI: Integrates with AI applications (e.g. LangGraph, mem0) for short-term memory, long-term memory, LLM response caching (semantic caching), and retrieval augmented generation (RAG).
- Real-Time Analytics: Powers personalization, recommendations, fraud detection, and risk assessment.
Redis is a popular choice for developers worldwide due to its combination of speed, flexibility, and rich feature set. Here's why people choose Redis for:
- Performance: Because Redis keeps data primarily in memory and uses efficient data structures, it achieves extremely low latency (often sub-millisecond) for both read and write operations. This makes it ideal for applications demanding real-time responsiveness.
- Flexibility: Redis isn't just a key-value store, it provides native support for a wide range of data structures and capabilities listed in What is Redis?
- Extensibility: Redis is not limited to the built-in data structures, it has a modules API that makes it possible to extend Redis functionality and rapidly implement new Redis commands
- Simplicity: Redis has a simple, text-based protocol and well-documented command set
- Ubiquity: Redis is battle tested in production workloads at a massive scale. There is a good chance you indirectly interact with Redis several times daily
- Versatility: Redis is the de facto standard for use cases such as:
- Caching: quickly access frequently used data without needing to query your primary database
- Session management: read and write user session data without hurting user experience or slowing down every API call
- Querying, sorting, and analytics: perform deduplication, full text search, and secondary indexing on in-memory data as fast as possible
- Messaging and interservice communication: job queues, message brokering, pub/sub, and streams for communicating between services
- Vector operations: Long-term and short-term LLM memory, RAG content retrieval, semantic caching, semantic routing, and vector similarity search
In summary, Redis provides a powerful, fast, and flexible toolkit for solving a wide variety of data management challenges. If you want to know more, here is a list of starting points:
Redis Community Edition (Redis CE) was renamed Redis Open Source with the v8.0 release.
Redis Ltd. also offers Redis Software, a self-managed software with additional compliance, reliability, and resiliency for enterprise scaling, and Redis Cloud, a fully managed service integrated with Google Cloud, Azure, and AWS for production-ready apps.
Read more about the differences between Redis Open Source and Redis here.
If you want to get up and running with Redis quickly without needing to build from source, use one of the following methods:
- Redis Cloud
- Official Redis Docker images (Alpine/Debian)
docker run -d -p 6379:6379 redis:latest
- Redis binary distributions
- Redis quick start guides
If you prefer to build Redis from source - see instructions below.
To get started as quickly as possible in your language of choice, use one of the following starter projects:
- Python (redis-py)
- C#/.NET (NRedisStack/StackExchange.Redis)
- Go (go-redis)
- JavaScript (node-redis)
- Java/Spring (Jedis)
To connect your application to Redis, you will need a client library. Redis has documented client libraries in most popular languages, with community-supported client libraries in additional languages.
- Python (redis-py)
- Python (RedisVL)
- C#/.NET (NRedisStack/StackExchange.Redis)
- JavaScript (node-redis)
- Java (Jedis)
- Java (Lettuce)
- Go (go-redis)
- PHP (Predis)
- C (hiredis)
- Full list of client libraries
redis-cli is Redis' command line interface. It is available as part of all the binary distributions and when you build Redis from source.
You can start a redis-server instance, and then, in another terminal try the following:
cd src
./redis-cliredis> ping
PONG
redis> set foo bar
OK
redis> get foo
"bar"
redis> incr mycounter
(integer) 1
redis> incr mycounter
(integer) 2
redis>
For a more visual and user-friendly experience, use Redis Insight - a tool that lets you explore data, design, develop, and optimize your applications while also serving as a platform for Redis education and onboarding. Redis Insight integrates Redis Copilot, a natural language AI assistant that improves the experience when working with data and commands.
Redis provides a variety of data types, processing engines, and capabilities to support a wide range of use cases:
Important: Features marked with an asterisk (*) require Redis to be compiled with the BUILD_WITH_MODULES=yes flag when building Redis from source
- String: Sequences of bytes, including text, serialized objects, and binary arrays used for caching, counters, and bitwise operations.
- JSON: Nested JSON documents that are indexed and searchable using JSONPath expressions and with Redis Query Engine
- Hash: Field-value maps used to represent basic objects and store groupings of key-value pairs with support for hash field expiration (TTL)
- Redis Query Engine: Use Redis as a document database, a vector database, a secondary index, and a search engine. Define indexes for hash and JSON documents and then use a rich query language for vector search, full-text search, geospatial queries, and aggregations.