Try Redis Cloud Essentials for Only $5/Month!

Learn More

Triggers and Functions

Bring application logic closer to your data with Redis Enterprise’s enhanced programmability

Enhanced Redis programmability

Triggers and Functions Enhanced Redis programmability

Triggers and functions give Redis powerful features for event-driven data processing. Using JavaScript, developers can create developer-defined functions against data stored in Redis.

Developers can define server-side functions that events trigger for execution.

Use an event-driven model that creates new ways to process data within Redis using Redis Stack. Triggers and functions work with a JavaScript engine that handles complex data types directly on data stored in Redis Enterprise.

What is a trigger?

A trigger is an event associated with data processing within Redis. Triggers encompass on-demand calls to a function, a specific command execution, stream processes, or time-related events. Any of these conditions can trigger the execution of a function stored in Redis.

What is a function?

Functions are JavaScript developer-defined functions stored in the Redis database. These functions run when an event triggers the execution or on demand. Functions can run on all shards directly where data lives and they can read data across shards.


Faster application logic

The application logic runs where the data lives and it executes when the data is changed. This removes network latency caused by data requests to and from the database used by third-party services.

Simpler application logic

Eliminates the need to maintain the same code across different applications. You can move application functionality inside the Redis database instead of transporting the code from the client application to the database every time you execute that code.

Better data consistency

Maintain consistent data when applications react to changing real-time conditions in the keyspace instead of using Pub/Sub notifications. The application performs the same functions when a defined trigger is encountered.

A JavaScript engine

You already know JavaScript, which means there’s no learning curve. You can get right to work to define functions.

Improved code resiliency

The database contains the code to execute these functions. The triggers and functions are backed up and replicated along with the database.

Use cases

Extend and validate data

Extend and validate data

Instead of sending metadata, process data, or validation requests to client applications for processing, add them directly on Redis.

Cross-application consistency

Cross-application consistency

Avoid duplicating code in each application. Each developer-defined function executes consistently in the Redis database regardless of the programming language used.

Transaction management

Transaction management

Construct complex database operations in a single transaction, ensuring data integrity and consistent processing directly in the Redis database.

Try it now!

Redis Stack includes the preview of triggers and functions. You can deploy a public preview with Redis Stack in the cloud by creating a database on Redis Cloud in the fixed tier within the Google Cloud/Asia Pacific (Tokyo) or AWS/Asia Pacific (Singapore) region, or deploy a self-managed instance from our download center.

Redis Cloud

Start today for free with Redis Cloud

Redis Enterprise Software

Download Redis Enterprise