Celery distributes units of work called tasks from client applications to worker processes through a message broker. It supports RabbitMQ, Redis, Amazon SQS, and other transports with retries and scheduling features.
Overview
Celery implements a task queue pattern for Python applications that need to offload work to background worker processes. A client enqueues a message describing a task; a broker delivers it to an available worker, which executes the task and can store results in configurable backends such as Redis, databases, or other listed stores.
The design allows multiple workers and brokers for horizontal scaling and high availability, with automatic retries on connection loss depending on broker capabilities. Tasks are defined as decorated Python callables bound to a Celery application instance configured with a broker URL.
Concurrency backends include prefork, Eventlet, gevent, and single-threaded solo modes. Serialization supports pickle, JSON, YAML, and msgpack, with optional compression and message signing mentioned in the feature list. The queue integrates with web frameworks including Django, Flask, FastAPI, Pyramid, and Tornado, often without a separate integration package.
Operators typically run Celery worker processes alongside a broker such as RabbitMQ or Redis on their own machines or datacenters. The maintainers note Windows is not officially supported though it may run, while Linux-oriented deployments are the documented norm.
Key features
- Task enqueueing via message brokers
- RabbitMQ, Redis, SQS, and Pub/Sub transports
- Automatic worker retries on connection failures
- Multiple concurrency pool implementations
- Pluggable result backends and serializers
- Framework integration with Django and Flask
- Scheduled and periodic task support
- Distributed multi-worker deployments
Use cases
- Running long jobs outside web request handlers
- Scaling background work across many worker machines
- Scheduling periodic maintenance or report jobs
- Decoupling producers and consumers in microservices
Does the same job as
Celery doesn't name these products itself, but its own description shows it does the same job.