All Projects → vijeth-aradhya → celery-priority-tasking

vijeth-aradhya / celery-priority-tasking

Licence: other
This is a prototype to schedule jobs in the backend based on some priority using Rabbitmq and Celery.

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to celery-priority-tasking

Kombu
Kombu is a messaging library for Python.
Stars: ✭ 2,263 (+7982.14%)
Mutual labels:  rabbitmq, celery
celery-kubernetes-example
Small Flask app with scalable, asynchronous backend workers deployed on Kubernetes.
Stars: ✭ 79 (+182.14%)
Mutual labels:  rabbitmq, celery
Rusty Celery
🦀 Rust implementation of Celery for producing and consuming background tasks
Stars: ✭ 243 (+767.86%)
Mutual labels:  rabbitmq, celery
Scaleable Crawler With Docker Cluster
a scaleable and efficient crawelr with docker cluster , crawl million pages in 2 hours with a single machine
Stars: ✭ 96 (+242.86%)
Mutual labels:  rabbitmq, celery
MinecraftNetwork
Minecraft server network backend
Stars: ✭ 35 (+25%)
Mutual labels:  backend, rabbitmq
Django Celery Docker Example
Example Docker setup for a Django app behind an Nginx proxy with Celery workers
Stars: ✭ 149 (+432.14%)
Mutual labels:  rabbitmq, celery
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (+767.86%)
Mutual labels:  backend, celery
Node Celery
Celery client for Node.js
Stars: ✭ 648 (+2214.29%)
Mutual labels:  rabbitmq, celery
Online-Judge
Online Judge for hosting coding competitions inside NIT Durgapur made by GNU/Linux Users' Group!
Stars: ✭ 19 (-32.14%)
Mutual labels:  rabbitmq, celery
leek
Celery Tasks Monitoring Tool
Stars: ✭ 77 (+175%)
Mutual labels:  rabbitmq, celery
Docker Cluster With Celery And Rabbitmq
Build Docker clusters with Celery and RabbitMQ in 10 minutes
Stars: ✭ 72 (+157.14%)
Mutual labels:  rabbitmq, celery
celery-connectors
Want to handle 100,000 messages in 90 seconds? Celery and Kombu are that awesome - Multiple publisher-subscriber demos for processing json or pickled messages from Redis, RabbitMQ or AWS SQS. Includes Kombu message processors using native Producer and Consumer classes as well as ConsumerProducerMixin workers for relay publish-hook or caching
Stars: ✭ 37 (+32.14%)
Mutual labels:  rabbitmq, celery
Python Devops
gathers Python stack for DevOps, these are usually my basic templates use for my implementations, so, feel free to use it and evolve it! Everything is Docker!
Stars: ✭ 61 (+117.86%)
Mutual labels:  rabbitmq, celery
Fastapi Celery
Minimal example utilizing fastapi and celery with RabbitMQ for task queue, Redis for celery backend and flower for monitoring the celery tasks.
Stars: ✭ 154 (+450%)
Mutual labels:  rabbitmq, celery
Django Celery Tutorial
Django Celery Tutorial
Stars: ✭ 48 (+71.43%)
Mutual labels:  rabbitmq, celery
Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+27167.86%)
Mutual labels:  backend, celery
Letsmapyournetwork
Lets Map Your Network enables you to visualise your physical network in form of graph with zero manual error
Stars: ✭ 305 (+989.29%)
Mutual labels:  rabbitmq, celery
Flower
Real-time monitor and web admin for Celery distributed task queue
Stars: ✭ 5,036 (+17885.71%)
Mutual labels:  rabbitmq, celery
python-asynchronous-tasks
😎Asynchronous tasks in Python with Celery + RabbitMQ + Redis
Stars: ✭ 37 (+32.14%)
Mutual labels:  rabbitmq, celery
fastweb
fastweb is a web-server integration solution. It based on tornado, celery, thrift.
Stars: ✭ 17 (-39.29%)
Mutual labels:  backend, celery

celery-priority-tasking

This is a prototype to schedule jobs in the backend based on some priority using Rabbitmq and Celery.

Video Transcoding Simulation

In this sample project, the powers of Celery and RabbitMQ in prioritized tasking can be seen. The simulation for transcoding a video to

  • 360p resolution takes 5 seconds
  • 480p resolution takes 10 seconds
  • 720p resolution takes 15 seconds
  • 1080p resolution takes 20 seconds

Of course this isn't even close to the real scencario, but it's good enough to observe the prioritized tasking.

To Enable Celery's Priority Tasking

These are the things to keep in mind to enable priority tasking without getting into trouble or unnecessary errors.

  • 'x-max-priority': 10 This argument must be provided to the queue so that RabbitMQ knows that tasks should be prioritized.
  • There is a possibility that the queue has no chance to prioritize the messages (because they get downloaded before the sorting happens). Prefetch multiplier is 4 by default.
CELERY_ACKS_LATE = True
CELERYD_PREFETCH_MULTIPLIER = 1

Execution

  • First, run pip install -r requirements.txt and go into the directory cd celery-priority-tasking/celery_sample_project.
  • Run python main.py for starting up Flask.
  • Then, in another terminal, run celery worker -c [number of workers] -A tasks -Q tasks --loglevel=info &.
  • Open up a browser and start simulating!

Preview

There is a small preview video here with only 1 Celery worker so that it's easy to observe the tasks getting sorted.

Install dependencies for RabbitMQ

To install dependencies on Debian machines, use the script provided or otherwise modify it accordingly for other operating systems.

Tutorials

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].