GGangindeepincode.hashnode.dev·Mar 29 · 6 min readRedis 启动流程全解析(server.c 到 main 函数)启动一个 Redis 实例看起来很简单,redis-server 一敲就完了。但你有没有想过,从按下回车到 Redis 开始接受连接,中间发生了什么? 这篇文章从 server.c 的 main 函数开始,一步步拆解 Redis 的启动流程。 先看 main 函数的全貌 main 函数在 server.c 的第 4000 行附近,核心流程可以概括为: 初始化基础库 → 加载配置 → 初始化服务器 00
GGangindeepincode.hashnode.dev·Mar 28 · 6 min readIs Redis Really Single-Threaded? A Comprehensive Analysis from Source Code PerspectiveRedis is single-threaded — this statement has spread so widely that many people believe Redis runs with just one thread. But if you check a running Redis process with ps -ef or top, you'll find there'10