Jan Giacomelli
Celery on AWS ECS - the art of background tasks & continuous deployment
#1about 2 minutes
Understanding the role of background tasks in applications
Background tasks are essential for handling long-running processes, scheduled jobs like newsletters, and operations that require retries without blocking the user.
#2about 3 minutes
Choosing Celery and AWS ECS with Fargate for your stack
Celery is the most widely used Python task queue, and AWS ECS with Fargate provides a serverless, scalable environment for running workers without managing servers.
#3about 2 minutes
Key AWS ECS settings for reliable Celery workers
Configure a long stop timeout (120 seconds) and set minimum healthy percent to 50% to give workers time to shut down gracefully during deployments.
#4about 3 minutes
Handling interruptions from continuous deployment and scaling
Frequent deployments and auto-scaling actions on ECS interrupt running tasks, which can prevent long-running jobs from ever completing and risk task loss.
#5about 10 minutes
Configuring Celery for task reliability and visibility
Set `task_acks_late`, `task_reject_on_worker_lost`, a short `visibility_timeout`, and a `prefetch_multiplier` of one to prevent task loss and duplication.
#6about 3 minutes
Remapping SIGTERM to SIGQUIT for immediate cold shutdowns
Use the `BILLIARD_REMAP_SIGTERM` environment variable to remap the SIGTERM signal to trigger a cold shutdown, ensuring interrupted tasks are immediately re-queued.
#7about 3 minutes
Designing tasks to be short-lived and idempotent
Design tasks to be idempotent and aim for a maximum processing time under 15 minutes to reduce the impact of interruptions and ensure reliable execution.
#8about 7 minutes
Using fan-out and batching patterns to manage long workloads
Break down large jobs using the fan-out pattern for parallel processing or the batching pattern for sequential, interruptible processing of smaller chunks.
#9about 3 minutes
Using Redis for task locking to prevent duplicate execution
Implement a locking mechanism using Redis to ensure that only one worker can process a specific task at a time, preventing race conditions and duplicate work.
#10about 4 minutes
Reviewing code examples for fan-out, batching, and locking
A walkthrough of Python code demonstrates how to implement the fan-out, batching, and Redis-based locking patterns for robust Celery tasks.
#11about 16 minutes
Answering common questions about Celery on AWS
Discussion on topics including the generality of interruption problems, collecting logs from killed workers, and finding additional learning resources for Celery and AWS.
Related jobs
Jobs that call for the skills explored in this talk.
Wilken GmbH
Ulm, Germany
Senior
Amazon Web Services (AWS)
Kubernetes
+1
envelio
Köln, Germany
Remote
Senior
Python
Software Architecture
Matching moments
01:37 MIN
Using AWS Fargate for flexible batch processing
The Road to MLOps: How Verivox Transitioned to AWS
03:45 MIN
A technical overview of AWS container services
Containers in the cloud - State of the Art in 2022
05:17 MIN
Managing processes, tasks, and sidecars for applications
Kubernetes dev is fun, but setup and ops isn't! See a fun PaaS alternative to push any code, ipynbs or even just data!
25:09 MIN
Audience Q&A on serverless IoT development
Building your way to a serverless powered IOT Buzzwire game
12:43 MIN
Q&A on the future of CI/CD and tooling
Plan CI/CD on the Enterprise level!
03:08 MIN
Combining patterns for advanced serverless architectures
Serverless landscape beyond functions
04:41 MIN
Answering questions on deployment, performance, and tooling
Fully Orchestrating Databricks from Airflow
15:07 MIN
Q&A on developer advocacy and technical details
Offline first & automatic data synchronisations for your web and mobile applications
Featured Partners
Related Videos
Containers in the cloud - State of the Art in 2022
Federico Fregosi
Cloud-nativeApplications- What’s the buzz about
Jens Eickmeyer
Python-Based Data Streaming Pipelines Within Minutes
Bobur Umurzokov
High performance Serverless Java on AWS
Vadym Kazulkin
Remote Driving on Plant Grounds with State-of-the-Art Cloud Technologies
Oliver Zimmert
Concurrency in Python
Fabian Schindler
Server Side Serverless in Swift
Sebastien Stormacq
Single Server, Global Reach: Running a Worldwide Marketplace on Bare Metal in a Cloud-Dominated World
Jens Happe
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Celonis
Edinburgh, United Kingdom
Remote
Senior
Python
Data analysis
Machine Learning

NEXT DIGITAL
Remote
Terraform
Continuous Integration
Amazon Web Services (AWS)
Scripting (Bash/Python/Go/Ruby)


Celonis
München, Germany
Senior
API
Azure
Kafka
DevOps
Python
+11

WeCloudData
Remote
CSS
GIT
HTML
REST
+7


AND Digital
Croydon, United Kingdom
API
ETL
XML
Unit Testing
Continuous Integration
+1


Client Server
Charing Cross, United Kingdom
Remote
£85-100K
Linux
Python
Docker
+6