TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Redis: under the hood

85 pointsby cannedprimatesabout 14 years ago

3 comments

antirezabout 14 years ago
What changed since this article was written:<p>1) The Server structure in the unstable branch is finally divided into sections using comments.<p>2) The command table is now loaded into an hash table, so the lookup is now O(1) and it is possible to alter the hash table at runtime. This is how we implement ed the command renaming and shadowing in redis.conf.<p>3) The shared integers are not used when diskstore is enabled, since we need tha t every object is independent with a different LRU timestamp and so forth. But o therwise using the default mode of operations (in memory) shared integers are us ed.<p>4) Databases are now watched for the implementation of "WATCH" using a better AP I, that is signalModifiedKey().<p>5) Now we listen to the TCP socket and to Unix socket if configured. The Redis C luster branch (not public) will also listen to an additional TCP port using for cluster message passing.<p>7) Loading data from disk to memory is now non blocking, we do this re-entering the event loop while loading data.<p>8) Response reading is now faster and cleaner code, thanks to Pieter's work.<p>This is a very nice overview. Of course only the surface is covered, there are a lot more things going on in the specific commands, in VM / diskstore command (by far the most complex part of Redis), in specially encoded data types, and in rdb/AOF loading/saving, incrementally expanding hash tables, ...<p>In just 30k lines of code there is already a lot to take in mind!<p>Basically I and Pieter already reached the point where we are experts in different areas. We both understand the whole Redis codebase, but for instance he is more expert in the sorted sets and special encoding code, I'm more expert in the diskstore things, and so forth.
jeangenieabout 14 years ago
can anyone with some technical expertise comment on the quality of this write-up?
评论 #2301932 未加载
评论 #2302863 未加载
pohlabout 14 years ago
antirez, did you delete a comment here? I see a dead one that appears to be very informative, and I'm wondering why it didn't live.
评论 #2302597 未加载
评论 #2302756 未加载