Favicon of redis

redis

An in-memory data structure server providing caching, pub/sub, streams, search, and vector storage for real-time applications.

Redis is an in-memory data structure server used as a cache, message broker, and general-purpose data store for applications that need very low latency. Because it keeps data primarily in memory and uses efficient data structures, reads and writes are typically sub-millisecond, which makes it a common building block wherever a primary database is too slow for the access pattern. It's aimed at backend developers who need fast key-value access, session storage, queues, rate limiting, or search and vector retrieval without standing up a separate specialized system for each of those needs.

Key features

  • Multiple data structures: strings, lists, sets, hashes, sorted sets, JSON, and bitmaps/bitfields, each with high-level semantics for building counters, queues, leaderboards, and rate limiters.
  • Redis Search: indexing for hash and JSON documents supporting vector search, full-text search, geospatial queries, ranking, and aggregations, effectively giving Redis document-database and search-engine capabilities.
  • Streams and pub/sub: append-only logs with consumer groups for event sourcing and notifications, plus lightweight pub/sub messaging between publishers and subscribers.
  • Probabilistic data structures: HyperLogLog, Bloom filter, Cuckoo filter, t-digest, top-k, and count-min sketch types for approximate counting and membership checks at scale.
  • Transactions and scripting: groups of commands execute as a single isolated operation, and Lua scripts can be uploaded and run server-side for efficient multi-step logic.
  • Vector store for AI workloads: used for short- and long-term LLM memory, semantic caching, semantic routing, and retrieval augmented generation (RAG) pipelines.
  • Extensibility via modules: a modules API lets you add new Redis commands and functionality beyond what ships in core.
  • Broad client library support: official and community-supported clients for Python, JavaScript, Go, Java, C#/.NET, PHP, C, and more, plus starter projects in each of those languages to get a working connection quickly.
  • Redis Insight tooling: a companion GUI for exploring data, designing and developing against a running instance, and onboarding new users, with an integrated AI assistant (Redis Copilot) for working with data and commands in natural language.

Ideal use cases

Redis is the standard choice when an application needs to read or write frequently-accessed data faster than a primary database can serve it: caching layers in front of Postgres or MySQL, session stores for web apps, job queues built on lists, leaderboards on sorted sets, and rate limiters. It also fits real-time analytics (personalization, fraud detection, recommendations) and, increasingly, as the vector and semantic-cache layer for LLM applications that need fast retrieval-augmented generation.

It's less suited as a system of record for data that needs durability guarantees stronger than what an in-memory store with periodic persistence provides, or for datasets far larger than available RAM where a disk-oriented database is a better fit. If your workload is dominated by complex relational queries and joins rather than key-based access, a traditional SQL database remains the better primary store, with Redis layered in front as a cache rather than a replacement.

For teams that would rather not run and patch Redis themselves, Redis Cloud offers a fully-managed option integrated with Google Cloud, Azure, and AWS, and Redis Software provides a self-managed enterprise option with added compliance and resiliency features on top of the open-source core.

Installation

The fastest way to try Redis is the official Docker image:

docker run -d -p 6379:6379 redis:latest

Binary distributions are also available via Homebrew, Snap, RPM, and Debian packages. To connect and try basic commands with the bundled CLI:

cd src
./redis-cli
redis> ping
PONG
redis> set foo bar
OK
redis> get foo
"bar"

To build from source (Ubuntu 22.04 example), install the required toolchain, then compile:

sudo apt-get install -y --no-install-recommends \
  ca-certificates wget dpkg-dev gcc g++ libc6-dev libssl-dev make git cmake \
  python3 python3-pip python3-venv python3-dev unzip rsync clang automake autoconf libtool

cd /usr/src/redis-<version>
export BUILD_TLS=yes INSTALL_RUST_TOOLCHAIN=yes
make -j "$(nproc)" all
./src/redis-server redis-full.conf

Client libraries exist for most popular languages (redis-py, node-redis, Jedis, go-redis, StackExchange.Redis, and others), and Redis Insight provides a GUI for exploring data and developing against a running instance.

Categories:

Frequently asked questions

Share:

Stars
75.4K
Forks
24.7K
Last commit
13 hours ago
Repository age
17 years
Self-hosted
No
Activity score
90/100
View Repository
Built with:

Similar to redis

Favicon

 

  
  
Favicon

 

  
  
Favicon