17–19 October 2016: Conference & Tutorials
19–20 October 2016: Training
London, UK

The new Redis module system

Dvir Volk (Redis Labs)
16:55–17:35 Tuesday, 18/10/2016
The new stuff
Location: Balmoral Level: Intermediate

Prerequisite knowledge

  • Experience with Redis
  • A general understanding of how modules work

What you'll learn

  • Understand how to create a low-latency Redis module for your own use, for the community, or to make available as a commercial offering.


The new Redis module system is an exciting new innovation for Redis announced by Salvatore Sanfilippo at Redisconf in May. Redis modules give you the ability to extend Redis by loading dynamic libraries into it, creating new commands that operate on different data types or perform functions that Redis wasn’t designed for, including full text search, graph operations, SQL support, and more. Dvir Volk explains how the Redis module system was designed and how developers can take advantage of the power of Redis to create new commands and different data types.

To extend Redis properly, a module has to have access to Redis’s internal API. But directly exporting the Redis core functions to modules creates huge problems: the module starts to depend on the internal details of Redis. If the Redis core evolves, the module needs to be rewritten. This creates either a fragile modules ecosystem or stops the evolution of the Redis core. To solve this problem, the Redis core is decoupled from the modules API but still has low-level access to directly manipulate Redis’s data structure. There is also a big effort to provide a clean API that is not prone to misuse. For example, there is support for automatic memory management so that the context the command operates on collects the objects that are not explicitly freed by the user in order to free them when the command returns if needed. This makes writing modules a lot simpler.

Photo of Dvir Volk

Dvir Volk

Redis Labs

Dvir Volk is a veteran engineer, entrepreneur, open source advocate, and former newspaper editor. Dvir began his tech career developing his own massively scalable web search engine, which is now integrated into many of Israel’s top websites. He later went on to cofound the social networking startup ILCU and served as director of engineering at Giraffic, a P2P video distribution provider. In his last role as chief architect at mobile startup EverythingMe, Dvir designed the company’s entire infrastructure around Redis, becoming one of the earliest members and active evangelists of the Redis community.