June 24, 2024

How does Redis store data?

The Redis basic data structure is a hashmap though it supports several sorts of nested structures. like a map with lists within the values.

Redis offers two forms of persistence. One is with an append only file (AOF) which lists the sequence operations performed to set and change the data. this is often written periodically to disk(for example every second). this suggests there’s some small risk of knowledge loss. But we get fast write performance in exchange with some basic persistence a very different tradeoff than one you see with ACID relational databases. the opposite form is RDB. in this mode Redis forks a process and the child writes its data set to the .rdb image file. this is often efficient under the CoW (copy-on-write) memory management semantics which are common to most kinds of Unix (and Linux).

One thought on “How does Redis store data?

Comments are closed.