Tagged articles
Rehash
11 articles · Page 1 of 1
Redis achieves its remarkable speed through in‑memory storage, an efficient hash table design, single‑threaded execution that eliminates context switches, epoll‑based I/O multiplexing, progressive rehashing, and cached timestamps, all of which together enable near O(1) operations and minimal latency.
Rehashhash tablein-memory database
0 likes · 7 min read

This article explains the inner workings of Redis Hashes, covering the dict and listpack storage mechanisms, memory‑optimizing conditions, rehashing strategies, and the underlying C structures that enable fast O(1) field lookups and efficient memory usage.
BackendC++Hash
0 likes · 11 min read

This article explains the JDK 1.8 HashMap resize/re‑hash optimization, showing how the new algorithm splits buckets instead of re‑hashing every entry, and includes the full source code and visual illustrations for single nodes, linked lists, and red‑black trees.
HashMapJDK8Rehash
0 likes · 8 min read

This article explains why Redis is fast, describes its underlying data structures and how keys and values are stored using hash tables and hash buckets, discusses hash collisions and chain hashing, and details the progressive rehash mechanism that maintains performance as data grows.
Rehashdata structureshash table
0 likes · 11 min read

This article explains the internal structure of Redis dictionaries, how elements are added, and how rehash-based resizing works, drawing parallels with Java's HashMap to help interviewees answer related questions effectively in technical interviews.
HashMapRehashdata structure
0 likes · 9 min read

This article explains how Redis relies on hash tables as the underlying dictionary structure for its databases and data types, detailing the dict layout, collision handling, progressive rehash algorithms, and the safe and unsafe iterator mechanisms used to traverse the hash table.
Rehashdata structuresdictionary
0 likes · 14 min read

This article explains why Redis delivers exceptional performance by examining its pure in‑memory operations, single‑threaded design, efficient data structures such as SDS, dictionaries, skip‑lists, zip‑lists, and the encoding and rehash strategies that keep latency low even under heavy load.
Rehashdata structuresencoding
0 likes · 19 min read

The article details how Redis’s incremental rehashing can double memory usage and trigger massive key eviction and scan inconsistencies in large‑scale clusters, explains the underlying dictionary structures, demonstrates the cursor bug when tables shrink, and presents a memory‑guard and scan‑cursor patch that resolves both problems.
C++RehashSCAN
0 likes · 26 min read

This article explains how Redis uses a dual‑hashtable structure and a progressive rehash process to handle hash collisions, detailing the rehash conditions, migration steps, and performance implications for in‑memory key‑value storage.
Rehashhash tablein-memory database
0 likes · 6 min read

This article explains Redis's dictionary structure, the conditions that trigger rehashing, the step‑by‑step incremental rehash process, and provides the core C implementation code, illustrating how Redis maintains high performance while resizing its hash tables.
C++Database InternalsRehash
0 likes · 8 min read


21CTOMar 30, 2016 · Fundamentals
This article explains how to select appropriate hash functions for different key types, compares Thomas Wang's integer mix function with MurmurHash for strings, and details rehash strategies, load factor thresholds, and value storage structures in hash tables.
MurmurHashRehashThomas Wang
0 likes · 6 min read
