-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve celery performance #1165
Conversation
b7f3fe3
to
8db81fa
Compare
Other setting we should take into account:
|
I agree that we should add Concerning |
If there is a concern about the heartbeat, we can use the default for now. Yes, setting the I will update the PR with the new defaults. |
8db81fa
to
b856f73
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a changelog entry? https://docs.tutor.edly.io/tutor.html#contributing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, let's merge this!
Description
This removes the
gossip
andmingle
features to improve Celery's performance and reduce the number of messages sent to Redis. It also increases the heartbeat interval to60s
from2s
.n^2
increasing dramatically network traffic which isn't needed.For the heartbeat, maybe 20s is a better default in case of network issues or Redis downtimes. However, keep in mind that this heartbeat does nothing. If you disable the heartbeat the workers still will detect if the broker goes down and start the reconnect process, so we should consider removing it completely.
References:
https://www.cloudamqp.com/blog/python-celery-and-rabbitmq.html
https://ankurdhuriya.medium.com/understanding-celery-workers-concurrency-prefetching-and-heartbeats-85707f28c506