Background Workers

Background workers are useful for processes that need to run continuously (unlike cron jobs) but that don’t expose a port like web services or private services.

They are most often used to run event loops that listen on a queue backed by a datastore such as Redis and process events as they come in. This helps make your public-facing services more responsive by offloading long-running tasks to separate processes.

Getting Started

A few examples to get you started:

These examples will create a background worker to process tasks and a Redis instance to persist and queue the tasks.