Grokking Redis
Vote

0% completed

​

2.4 Hash Memory Encoding and Patterns

The same small hash can take several times more memory in one internal form than in the other. The previous lesson treated a hash as a map of fields under one key: HSET, HMGET, and HINCRBY act on single fields, fields can expire on their own schedule since Redis 7.4, and a hash beats a JSON string when fields are read and changed independently.

This lesson looks at how Redis stores a hash in memory, why small hashes are so cheap, and how bucketing uses that to store 100 million small values in a fraction of the memory. It ends with common patterns and pitfalls.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content