1
votes

I have an Elastic Beanstalk setup where I want to do two things:

  1. Have all workers prioritize certain jobs (premium > free)
  2. Have some workers only do specific jobs (enterprise worker does only enterprise jobs)

The workers use the SQS daemon that fetches from the queue and I'm not sure if and how to modify them.

How would you achieve this using Elastic Beanstalk?

2

2 Answers

0
votes

With SQS this is usually accomplished by having multiple queues. You could have one for Enterprise, one for Premium, and one for Free. Then have your worker check them in that order (and depending on your application, perhaps have some worker that only check Enterprise/Premium/Free. This may depend how long your jobs take and what your user's expectations are).

I do not know exactly how to set this up in Elastic Beanstalk, but hopefully this is enough to get you started.

0
votes

The main EB adventure is that it is out-of-the-box system you setup in minutes. The disadvantage is the you have limited control over it.

What you described could be achieved on the worker environment. I think you could disable the worker daemon, and handle all the message processing yourself in your up according to your criteria.

You could also create multiple queues if you want using by using Resources setup options.

However, the futher you deviate from its behavior, the more management you will have to do yourself. Subsequently, you may get to the point where it is simply easier to make your own environment for processing your messages outside of EB.