My application is heavily dependent on AWS services, and I'm looking for the best solution based on them. The web application launches the scheduled task (presumably repeats endlessly), which requires a certain amount of resources that must be completed. One task run usually takes a maximum of 1 min.
The current idea is to transfer jobs through SQS and create workers in EC2 instances depending on the size of the queue. (this part is more or less clear) But I try my best to find the right solution for the actual launch of tasks at certain intervals. Suppose we are dealing with 10,000 jobs. Therefore, for the scheduler to run a 10k cronjob (the work itself is quite simple, just passing the job description via SQS) at the same time seems like a crazy idea. So the actual question is how do the scheduler itself autoscale (given the scenarios when restarting the scheduler, creating a new instance, etc.)? Or is the scheduler redundant as an application, and is it wiser to rely on AWS Lambda features (or other scheduling services)? The problem with using Lambda functions is a certain limitation, and the 128 MB memory provided by one function is actually too much (20 MB seems more than enough)
Alternatively, the worker himself can wait a while and tell the planner that he should start the work again. Let's say if the frequency is 1 hour:
1. Scheduler sends job to worker 1 2. Worker 1 performs the job and after one hour sends it back to Scheduler 3. Scheduler sends the job again
However, the problem lies in the possibility of this worker being reached.
Bottom Line I am trying to create a lightweight scheduler that does not require autoscaling and serves as a hub for the sole purpose of transmitting job descriptions. And, of course, you should not fade when you restart the service.
source share