Background Workers

Offload asynchronous tasks to a separate service listening on a queue.

Background workers are services that run continuously (like a web service or a private service), but they don't receive any incoming network traffic. Instead, these services usually poll a task queue (such as one backed by a Render Key Value instance) and process new tasks as they come in:

Diagram of a background worker polling a task queue

Background workers help to keep your apps responsive by offloading long-running, asynchronous tasks from your services in the critical request path.

Common worker tasks include:

  • Processing media files
  • Generating reports
  • Interacting with third-party APIs, such as Stripe, Twilio, or AI models

You can use the frameworks below to simplify polling a task queue backed by a Redis®-like store (such as Render Key Value).

LanguageFramework

Python

Celery (see quickstart)

Ruby

Sidekiq (see quickstart)

Node.js

BullMQ

Go

Asynq

Elixir

Oban

Note: This framework integrates with Render Postgres instead of Key Value.

Rust

apalis