原文链接 MARCH 10, 2011 In my previous article, I took a superficial look at how Redis starts up and prepares itself to process commands. In this article, I’ll follow a GET and a SET command as they move from client through the server and back. The GET will be for a key that doesn’t exist, and the SET will set that key. Then I’ll look quickly at
by Paul Smith (@paulsmith)
How does the Redis server work?
I was curious to learn more about Redis’s internals, so I’ve been familiarizing myself with the source, largely by reading and jumping around in Emacs. After I had peeled back enough of the onion’s layers, I realized I was trying to keep track of too many details in my head, and it wasn’t clear how it all hung together. I decided to write out in narrative form how an instance of the Redis server starts up and initializes itself, and how it handles the request/response cycle with a client, as a way of explaining it to myself, hopefully in a clear fashion.