LearnThatStack Ace your next interview
Database Technologies

Redis.

Start free Change topic Change
Practice · Questions

All questions

Showing of 33
Beginner 4
01

What are the different data types supported by Redis?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Redis supports these core data types, each with its own commands:

  • Strings: text, numbers or binary data, up to 512MB.
  • Hashes: field-value pairs, like an object.
  • Lists: strings in insertion order.
  • Sets: unique strings with no order.
  • Sorted sets, or ZSets: unique strings ordered by a score.
  • Bitmaps: a string used as an array of bits.
  • HyperLogLog: a probabilistic structure that estimates cardinality, the number of unique items.
  • Geospatial indexes: longitude and latitude points you search by radius.
  • Streams: append-only logs of events, used as message queues.

Redis 8 adds JSON, time series and probabilistic types such as Bloom filters. It also adds vector sets for similarity search.

SET mykey "hello"          # String
HSET user:1 name "John"    # Hash
LPUSH mylist "item1"       # List
SADD myset "member1"       # Set
ZADD myzset 1 "item1"      # Sorted Set
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

02

What is the difference between Redis and traditional relational databases?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Redis keeps its data in memory as keys holding data structures, while a relational database keeps tables on disk and answers SQL queries. Redis is far faster for simple reads and writes, and a relational database gives you joins, a fixed schema and full transactions.

Aspect Redis Relational database
Storage In memory, so data must fit in RAM Disk-based
Data model Key-value, NoSQL Relational tables
Schema Schema-less Fixed schema
ACID Limited: MULTI and EXEC have no rollback Full ACID compliance
Performance Extremely fast, microseconds Slower, milliseconds
Persistence Optional, as snapshots or a log of writes Always persistent
Query language Commands SQL
Relationships No joins Complex relationships

Redis suits caching, sessions and real-time work such as counters and leaderboards. A relational database suits complex business logic and data with many relationships. Many systems use both. The relational database stays the source of truth, and Redis holds a fast copy of the data read most often.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

03

Explain Redis persistence mechanisms.

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Redis saves its data to disk as RDB snapshots or an AOF log, or both. A pure cache can turn persistence off.

Redis Database (RDB) saves a point-in-time snapshot at set intervals. Redis forks a child process, a copy of itself, which writes one compact binary file. That file suits backups, disaster recovery and fast restarts. After a crash you lose the writes since the last snapshot, often several minutes.

Append Only File (AOF) logs every write operation, and Redis replays it at startup. The default appendfsync everysec risks about one second of writes, and always syncs every write but is slow. The file is larger and Redis restarts from it more slowly, so Redis rewrites it in the background.

With both on, Redis restores from the AOF, the more complete copy. The AOF starts from a base file, a snapshot the logged writes follow. By default that base uses the RDB format, so it loads fast.

# RDB configuration
# Save if at least 1 key changed in 900 seconds
save 900 1
# Save if at least 10 keys changed in 300 seconds
save 300 10

# AOF configuration
appendonly yes
# Options: always, everysec, no
appendfsync everysec
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

04

What are the common use cases for Redis?

Part of Pro
Intermediate 17
05

How does Redis handle memory management?

Part of Pro
06

Explain Redis transactions and their limitations.

Part of Pro Visual
07

What is Redis Pub/Sub and how does it work?

Part of Pro
08

Explain Redis Cluster and its benefits.

Part of Pro Visual
09

What is pipelining in Redis and when should you use it?

Part of Pro
10

How does Redis replication work?

Part of Pro
11

What are Redis modules, and which ones are popular?

Part of Pro
12

Explain different Redis configuration parameters for performance tuning.

Part of Pro
13

How do you implement Redis as a message queue?

Part of Pro Visual
14

Why should you avoid KEYS in production, and what should you use instead?

Part of Pro
15

What happened to the Redis license, and what is Valkey?

Part of Pro
16

What is the difference between Redis Pub/Sub and Redis Streams?

Part of Pro
17

Explain Lua scripting in Redis and its advantages.

Part of Pro
18

Explain Redis Stream data structure and its use cases.

Part of Pro
19

What is Redis Sentinel, and how do you configure it?

Part of Pro
20

Why is Redis fast even though it runs commands on a single thread?

Part of Pro
21

How does key expiration work in Redis?

Part of Pro Visual
Expert 12
22

How would you implement distributed locking using Redis?

Part of Pro
23

How do you monitor and debug Redis performance issues?

Part of Pro
24

How do you implement high availability for Redis?

Part of Pro
25

Describe advanced Redis memory optimization techniques.

Part of Pro
26

How would you design a Redis-based caching strategy for a high-traffic application?

Part of Pro
27

Explain Redis security best practices and implementation.

Part of Pro
28

How do you handle Redis failover and disaster recovery?

Part of Pro
29

Design a Redis-based rate limiting system.

Part of Pro Visual
30

How would you implement a distributed cache invalidation system using Redis?

Part of Pro
31

Describe advanced Redis data modeling techniques for complex applications.

Part of Pro
32

How are Redis sorted sets implemented internally?

Part of Pro
33

What problems do big keys and hot keys cause, and how do you fix them?

Part of Pro

No matches

Try a different filter or search term.

Know someone prepping for Redis? Send them this set.
Quick recap

Redis in pictures.

A quick recap of Redis in 30 short animated pictures, one idea at a time. About 8 min to get the whole topic back in your head before you walk in. Pause any picture, slow it down, or step through it.

Pro The first chapter is free to play. The other 27 pictures come with Pro.

Get Pro · $10/mo
Pro · $10/mo

30 of 33 Redis answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime

Change topic

Pick a different technology or stack. Your current topic stays put until you choose a new one.

Technologies
No technologies match “”.
Cross-cutting topics
No topics match “”.
By role
Stacks & frameworks

MEAN

MongoDB, Express, Angular, Node.js

MERN

MongoDB, Express, React, Node.js

LAMP

Linux, Apache, MySQL, PHP

Django

Python Full-Stack Development

Ruby on Rails

Convention over Configuration

Serverless on AWS

Serverless Architecture on AWS

Flutter Mobile

Flutter Cross-Platform Mobile Development

Spring Boot

Enterprise Java Development

.NET

Microsoft Ecosystem

Vue

Vue.js, Vite, TypeScript, Tailwind, Node.js

Go Backend

Golang, gRPC, PostgreSQL, Redis, RabbitMQ

FastAPI

Python, FastAPI, SQLAlchemy, PostgreSQL

React Native

React, TypeScript, Redux, Firebase

iOS Native

Swift, SwiftUI, UIKit, Firebase

Android Native

Java, Jetpack Compose, Firebase

DevOps / Platform

Docker, Kubernetes, Terraform, CI/CD

AI Engineer

LLMs, RAG, Agents, Evals

AI-Powered Developer

Claude Code, Copilot, Agentic Workflows

Core SWE Interview Prep

Data structures, algorithms, OS, concurrency, networking, git