I have a Django application. I am using Celery to run long-running processes on the background. Both the application and celery workers run on the same machine.
Now we are moving our servers to AWS. On AWS, we want to create a setup like the following:
We have n EC2 instances that run the app servers, and we have m EC2 instances as workers. When we need to do a long-running process, app server sends this job to the worker, and the worker processes the job. But the job is dependent on Django models and the database.
How can we setup the workers to enable them run these django model dependent jobs?