[Answer]-Does Django Block When Celery Queue Fills?

1đź‘Ť

âś…

It’s impossible to really answer your question without an in-depth analysis of your actual code AND benchmark protocol, and while having some working experience with Python, Django and Celery I wouldn’t be able to do such an in-depth analysis. Now there are a couple very obvious points :

  1. if your workers are running on the same computer as your Django instance, they will compete with Django process(es) for CPU, RAM and IO.

  2. if the benchmark “client” is also running on the same computer then you have a “heisenbench” case – bombing a server with 100s of HTTP request per second also uses a serious amount of resources…

To make a long story short: concurrent / parallel programming won’t give you more processing power, it will only allow you to (more or less) easily scale horizontally.

0đź‘Ť

I’m not sure about slowing down, but it can cause your application to hang. I’ve had this problem where one application would backup several other queues with no workers. My application could then no longer queue messages.

If you open up a django shell and try to queue a task. Then hit ctrl+c. I can’t quite remember what the stack trace should be, but if you post it here I could confirm it.

Leave a comment