Redis

Definition

In-memory data structure store used as a database, cache, and message broker, known for its high performance and support for various data types.

Use Cases

Provider Equivalents

Frequently Asked Questions

What's the difference between Redis and Memcached?
Memcached is a simple in-memory key-value cache (mostly strings) focused on caching only. Redis is an in-memory data structure store that supports richer data types (strings, hashes, lists, sets, sorted sets, streams), persistence options (saving to disk), replication, and features like pub/sub. If you only need basic caching, Memcached can be enough; if you need more capabilities (sessions, counters, queues, rate limiting, leaderboards), Redis is often a better fit.
When should I use Redis?
Use Redis when you need very fast reads/writes and can benefit from keeping data in memory. Common cases include caching database query results, storing user sessions, rate limiting (e.g., login attempts per minute), real-time counters and leaderboards, distributed locks, and lightweight queues/streams for background work. Avoid using Redis as the only system of record for critical data unless you design for persistence, backups, and failure scenarios.
How much does Redis cost?
Cost depends on how you run it. Self-managed Redis on a VM mainly costs compute, storage (if persistence is enabled), and operations time. Managed services (Amazon ElastiCache for Redis, Azure Cache for Redis, Google Memorystore for Redis, OCI Cache with Redis) are typically priced by node size (memory/CPU), number of nodes/replicas, region, network traffic, and optional features like clustering, high availability, backups, and reserved capacity/commitment discounts. The biggest cost drivers are required memory size, high availability (replicas across zones), and throughput needs.

Category: data

Difficulty: intermediate

Related Terms

See Also