How Skip Lists Power Redis Sorted Sets and In-Memory Indexes
from The Technical Co-Founder Podcast with Fexingo: Engineering Founders, CTOs, and Building from Code Hosted by Fexingo
In this episode, we dive into skip lists, the probabilistic data structure that underlies Redis sorted sets, LevelDB's memtable, and countless in-memory indexes. Lucas and Luna explore how skip lists achieve O(log n) operations with a simple randomized balancing mechanism, making them easier to implement and more concurrent-friendly than balanced trees like red-black trees. We walk through a concrete example: how Redis uses skip lists to power leaderboard operations like ZADD and ZRANK at scale. The discussion covers trade-offs in memory overhead, the role of the 'promotion probability' constant, and why skip lists are a go-to choice for systems that need fast range queries and simple lock-free reads. Perfect for engineers building databases, caches, or any application where sorted data structures matter. #SkipList #Redis #DataStructures #InMemoryIndexes #ProbabilisticDataStructures #DatabaseInternals #SoftwareEngineering #Tech #Business #Technology #FexingoBusiness #BusinessPodcast #TechnicalCoFounder #Engineering #CTO #Performance #SystemDesign #Algorithms Keep every episode free: buymeacoffee.com/fexingo
Embed this episode
No transcript yet.