Deep Dive into the Source Code of Redis

November 03, 2017 by Abhirath Mahipal


This is a work in progress. I’ll keep updating this article on a regular basis.

This is my attempt to thoroughly understand and document the code base of Redis. I’ve used actual file names which Redis uses and have split them into categories which I think they best fit.

DS and Algos

  • adlist
    A generic doubly linked list
  • ziplist
    A memory efficient doubly linked list for integers and strings
  • zipmap
    A memory efficient but slow data structure that maps a string to another string

Some Major Functionality

  • ae
    An event driven library to concurrently perform operations like network requests etc.

Helper Libraries

Processes Links

Good to Know

header guards

Flow Once You Start Redis