Redis Fundamentals
Redis is an in-memory data store that keeps values under keys and provides data structures such as strings, hashes, sets, and streams. You use it when fast access to transient or actively managed data fits the workload, with explicit choices for memory, persistence, and availability.
itDatabases and data storage | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: Redis Fundamentals
Redis is a server that keeps typed values behind keys, which sounds like a filing cabinet until you notice that the drawers can count, rank, deduplicate, and record events. That is the useful part. A string holds a value or counter. A hash holds named fields. A sorted set holds members with scores. A stream holds ordered entries. The key does not tell Redis what the value means. The data type and command do, so choosing them is the first design decision and not a decorative label applied after the code works.
The usual temptation is to call Redis a cache and walk away briskly before anyone asks what happens to the cached thing. A time to live is a timer attached to a key. When it ends, the key is gone. Memory pressure can also remove keys according to the selected eviction policy. This is excellent when a missing value can be rebuilt from a durable source. It is less excellent when the missing value was secretly the only copy of something important. Computers are very good at enforcing assumptions you forgot you made.
Persistence provides another set of choices. An RDB snapshot records the dataset at a point in time. An append-only file records write operations for replay. Neither option replaces a restore test, because a persistence file that cannot meet the recovery objective is mostly a comforting object with a filename. Replication can improve availability and read capacity, but it is asynchronous by default, so an acknowledged write can still disappear in a failover. This is not Redis being difficult. It is Redis declining to promise a physics-free network.
Redis Cluster adds a further turn of the map. It partitions keys across nodes by hash slot, which helps when one instance no longer fits the measured workload. It also makes key placement and client behavior part of the design. Start with a clear workload instead of treating a cluster as a ceremonial promotion for a database that has reached adulthood.
Read the intro for the full architecture and failure model. Use the slides to see which data structure matches each workload. Keep the cheatsheet nearby when the terms start arriving in packs. The practice reference and exercise make expiry, counters, streams, and inspection commands observable. Field Notes covers the operational costs that tend to appear after the pleasant diagram has left the room. The Reference tab is the route into the exact commands and configuration details.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://redis.io/docs/latest/develop/data-types/
Supports
- Redis is a data structure server with native data types
- Strings, hashes, lists, sets, sorted sets, and streams support different workloads
- Streams act as append-only logs and sorted sets order unique members by score
- https://redis.io/docs/latest/develop/clients/
Supports
- Applications connect to Redis through client libraries
- Redis documents supported client libraries for common languages
- redis-cli and Redis Insight can interact with a Redis server
- https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/
Supports
- Redis persistence uses RDB snapshots and append-only files
- Persistence settings involve recovery and data-loss tradeoffs
- https://redis.io/docs/latest/operate/oss_and_stack/management/replication/
Supports
- Redis replication is asynchronous by default
- WAIT requests replica acknowledgements but does not provide strong consistency
- Replication supports read scaling and high availability with operational limits
- https://redis.io/docs/latest/operate/oss_and_stack/management/scaling/
Supports
- Redis Cluster partitions keys across multiple nodes
- Cluster design affects key placement and client behavior
- https://redis.io/docs/latest/develop/pubsub/
Supports
- Redis pub/sub delivers messages to current subscribers
- Disconnected pub/sub subscribers do not receive prior messages
- https://redis.io/docs/latest/operate/oss_and_stack/management/eviction/
Supports
- Redis maxmemory and eviction policies control behavior under memory pressure
- Keys can be evicted according to the selected policy
- https://redis.io/docs/latest/develop/tools/cli/
Supports
- redis-cli sends commands to a Redis server and supports direct inspection
- INFO and CONFIG GET expose server information and configuration
- https://redis.io/
Supports
- Redis provides the reference implementation discussed in this course
- https://valkey.io/
Supports
- Valkey provides a Redis-compatible open-source in-memory data store
- https://aws.amazon.com/elasticache/
Supports
- Amazon ElastiCache is a managed in-memory caching service
- https://cloud.google.com/memorystore
Supports
- Google Cloud Memorystore provides managed in-memory data store services
- https://azure.microsoft.com/products/managed-redis
Supports
- Azure Managed Redis is a managed Redis offering
- https://www.dragonflydb.io/
Supports
- Dragonfly provides a Redis-compatible in-memory data store
- https://redis.io/blog/redis-5-0-is-here/
Supports
- Redis 2.8.9 introduced HyperLogLog in April 2014
- Redis 5.0 introduced Streams in October 2018
- https://redis.io/blog/redis-then-and-now-adapting-with-developers-through-every-era/
Supports
- Redis 3.0 added Redis Cluster in 2015
- Redis 3.2 added geospatial commands in 2016
- https://redis.io/blog/redis-4-0-availability-redis-enterprise/
Supports
- Redis 4.0 introduced the modules API and nonblocking deletion in 2017
- https://redis.io/blog/diving-into-redis-6/
Supports
- Redis 6.0 became generally available in April 2020 with access control lists and TLS support
- https://redis.io/blog/redis-7-generally-available/
Supports
- Redis 7.0 became generally available in April 2022 with Redis Functions
- https://redis.io/blog/redis-8-ga/
Supports
- Redis 8 became generally available in May 2025
- Redis 8 combined Redis Stack capabilities into Redis Open Source
- https://redis.io/tutorials/redis-software-observability-playbook/
Supports
- Eviction rate, cache hit ratio, and application latency help diagnose a cache that no longer fits its working set
- https://about.gitlab.com/blog/how-we-diagnosed-and-resolved-redis-latency-spikes/
Supports
- GitLab associated recurring Redis latency spikes with memory reaching the maxmemory eviction threshold
