Advertisement
Beginner Redis, Redis Architecture & Installation

What are the key architectural characteristics of Redis that make it so fast?

Short answer

Redis stores all of its data in memory rather than on disk, which is dramatically faster to read and write than traditional disk based databases, and it processes commands using a single main thread, avoiding the overhead and complexity of managing concurrent access from…

Save Redis mock interview
Advertisement
AModel answer
Redis stores all of its data in memory rather than on disk, which is dramatically faster to read and write than traditional disk based databases, and it processes commands using a single main thread, avoiding the overhead and complexity of managing concurrent access from multiple threads while still achieving extremely high throughput for typical workloads.
Example

-- All data lives in RAM, making reads and writes -- extremely fast compared to disk based systems SET mykey 'value' -- typically completes in microseconds

Real-world example
A high frequency trading application chooses Redis specifically because its in memory architecture allows for the extremely low latency reads and writes their system requires, something a traditional disk based database could not provide.
Likely follow-ups
  • Does storing everything in memory mean data is lost if the server restarts?
  • Why does a single threaded design not become a bottleneck for most applications?
Related topics