Server-side Lua scripting

Redis allows you to write server-side Lua scripts, essentially embedding scripts in your Redis instance to execute more complex operations. Redis maintains a script cache, so that you don't have to reload your scripts for each use.

It is important to note that Lua scripts have a 5-second time limit (by default) before being terminated. This limit exists to protect your Redis instance from long-running scripts, as Lua scripts are blocking due to Redis' single-threaded nature.

Get Seven NoSQL Databases in a Week now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.