redis/redis
Applications
The repository builds six binaries from a single source tree. They share most of their object files; the differences are in entry points and command tables.
| Binary | Source entry | Purpose | Page |
|---|---|---|---|
redis-server |
src/server.c main() |
The data server. Also runs in cluster mode. | redis-server |
redis-sentinel |
src/server.c main() (detected via argv[0]) |
Topology monitor and failover orchestrator. | redis-sentinel |
redis-cli |
src/redis-cli.c main() |
Interactive client, monitor, cluster manager, latency tester. | redis-cli |
redis-benchmark |
src/redis-benchmark.c main() |
Synthetic load generator. | redis-benchmark |
redis-check-rdb |
src/server.c → redis_check_rdb_main() |
Read and validate an RDB file. | redis-check tools |
redis-check-aof |
src/server.c → redis_check_aof_main() |
Read and validate (and optionally trim) an AOF. | redis-check tools |
The Makefile produces redis-server, redis-cli, and redis-benchmark as real binaries. The other three are filesystem links to redis-server that change behaviour based on argv[0] at startup. Look at src/Makefile lines around MAKE_INSTALL for the plumbing.
graph LR
src[src/server.c main] -->|argv[0] = redis-sentinel| sent[Sentinel mode]
src -->|argv[0] = redis-check-rdb| rdb[redis_check_rdb_main]
src -->|argv[0] = redis-check-aof| aof[redis_check_aof_main]
src -->|otherwise| serv[Standard server]
cli[src/redis-cli.c] --> bin1[redis-cli]
bench[src/redis-benchmark.c] --> bin2[redis-benchmark]Why a single binary?
The Redis maintainers prefer a single redis-server binary because:
- Operational simplicity. Operators install one file; the runtime mode comes from the config or the executable name.
- Code reuse. Sentinel and the check tools share the RDB parser, AOF parser, RESP layer, and ACL/TLS plumbing — there is no benefit to duplicating them in separate executables.
- Replication compatibility. Because the check tools use the exact RDB and AOF code paths the live server uses, they can never disagree on what is or isn't a valid file.
redis-cli and redis-benchmark are different — they are network clients linked against hiredis and linenoise rather than the server, and they don't include the dataset code at all.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.