I have this problem where we may have different SLOs (service level objectives) based on request. Some requests we want to process within 5 minutes, and some requests we can take longer to process (like 2 hours etc).
I was going to use Amazon SQS as a way to queue up the messages that need to be processed, and then use Auto-scaling to increase resources in order to process within allotted SLO. For example, if 1 machine can process 1 request every 10 seconds, then within 5 minutes I can process 30 messages. If I detect in the queue that the number of messages is > 30, I should spawn another machine to meet 5-minute SLO demand.
Similarly, if I have a 2-hour SLO, I can have a backlog as large as 720 before I need to scale up.
Based on this, I can't really place these different SLOs into the same queue, because then they will interfere with each other.
Possible approaches I was considering:
- Have an SQS queue for each SLO, and auto-scale accordingly.
- Have multiple message groups (one for each SLO), and then auto-scale based on message group.
Is (2) possible, I couldn't find documentation on that? If they are both possible, what are the pros and cons to each?