Answer the question
In order to leave comments, you need to log in
Django, is it reasonable to use celery+RabbitMQ for a task?
Actually, I want to organize a vote on the site for photos, the result is in a ten-point system.
At the moment I see 2 solutions:
1) create a form with a vote, run the formula on submit and save the value of the updated rating in the database.
2) celery + RabbitMQ, send a message through colic, update the rating either in celert in time, or after several votes, or ... I don’t know, I didn’t understand these technologies)
Now it seems to me 1 way is more profitable with a small number of votes, 2 th for heavy loads.
The main question is whether I correctly understood the purpose of the second bundle? They write so much about them, but I still don’t understand in what real cases they are used. Maybe there are better options to solve this problem?
I also remembered that achievements are needed, for them the same question.)
Thanks in advance for the answers.
Answer the question
In order to leave comments, you need to log in
For heavy loads, use redis, save the voting results and model IDs there, then once an hour, for example, synchronize the data to the database using celery, in any case, do not update the database on counters and voting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question