Back to Architecture Explorer

redis / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported.

62.0k
C
Architecture: database
main
redis
deps
hiredis
jemalloc
linenoise
lua
src
commands
modules
server.c
redis-cli.c
tests
Makefile
redis.conf
Structural Architecture

Redis maintains a beautifully self-contained, purely C-based structural organization. There are minimal dependencies, relying mostly on direct OS POSIX abstractions and a monolithic core executable setup managed plainly inside the `src` folder.

  • Uncompromising C simplicity. Minimal subdirectories, maximizing flat access.
  • Deep dependency encapsulation. Everything needed to build Redis completely isolated in the `/deps` directory.

Notable Directories

/src

The single, massive core directory containing everything from the CLI tools to the primary caching engine.

/deps

Embedded dependencies like jemalloc and hiredis, guaranteed to compile seamlessly without external package managers.

/tests

TCL-based test framework rigorously evaluating memory leaks and multi-threaded edge cases.

Build Your Own Ecosystem

Learn from redis's structure and craft your own software scaffolding.