Advanced Types for Rediss
Redis advanced types and features go beyond simple keys: bitmaps, HyperLogLog, geospatial indexes and sorted sets for specialised work, plus MULTI/EXEC transactions, optimistic locking with WATCH, and Lua scripts. These tools let you do counting, ranking and multi-step updates atomically inside the server.
Stage: Data Types · Part of the Redis roadmap · Last reviewed 19 November 2026
What to learn in Advanced Types
- Count unique visitors approximately using HyperLogLog and PFADD
- Build a leaderboard with ZADD and ZREVRANGE
- Query nearby points with GEOADD and GEOSEARCH
- Group commands in MULTI and EXEC and explain why there is no rollback
- Write a short Lua script run with EVAL for an atomic read-modify-write
Advanced Types interview questions
Does a Redis transaction roll back on error?
No. Commands queued between MULTI and EXEC run in order without interruption from other clients, but if one command fails at runtime the others still run. Syntax errors found while queuing abort the whole transaction. For conditional updates, combine WATCH or use a Lua script.
When would you pick a Lua script over MULTI/EXEC?
Use a script when the logic needs to read a value and branch on it inside one atomic step, which MULTI cannot do because commands are only queued. The script runs without interruption on the server. Keep it short, since it blocks all other commands while it runs.
Where Advanced Types fits in the Redis roadmap
Advanced Types belongs to the Data Types stage (beginner level), which takes about 12 hours. Core commands.
Other units in this stage
Back to the full Redis roadmap