Async + Event-Driven
The common patterns listed here are flexible and powerful enough to solve problems across all types of projects and codebases.
Moving code out of the critical path into background jobs to keep API response times performant.
Run task periodically, as cron jobs, like weekly emails or daily backups.
Handle high throughput webhooks in a fault tolerant way.
Break complex code into reliable, independently ran steps.
Trigger multiple functions from a single event.
Pause and wait until a specific time based off of data within an event.
Automatically cancel scheduled, paused, and waiting work using events.
Reliably manage thousands of jobs triggered by a single event or cron.