Redis
A deep dive into Redis. Architecture, data types and operations, persistency model, use cases and much more.
Hi Friends,
Welcome to the 55th issue of the Polymathic Engineer newsletter. This week, we will focus on Redis, a powerful and versatile tool that can be used for different purposes.
It can be a database, a cache, a message broker, a streaming engine, and much more.
The outline will be as follows:
What is Redis
A brief history
Operations and Data Types
Redis Architectures
Data persistency
Single thread model
Main use cases
The full version of this issue is reserved for paid subscribers.
What is Redis?
Redis is an acronym for REmote DIctionary Server, an open-source (BSD licensed) key-value database store. Keys are strings, and many different data structures can represent values.
Since Redis has native-wide support for data structures, it is often called a data structure server. Data structures can be basic, like String, List, Set, Hash, ordered like SortedSet, or probabilistic HyperLog.
This specific nature of Redis has led to much of its popularity and adoption amongst developers because it provides the data in data structures they wanted from the ground up.
Early on, it was used much like Memcached, but as Redis improved, it became viable for many other use cases, including publish-subscribe mechanisms, streaming, and queues.
A brief history
Redis was created by the Italian developer Salvatore Sanfilippo in the late 2000s.
He was working on a tool to help website owners get real-time information about their users' activities. This was an innovative feature since Google Analytics introduced it only in 2011.