Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority #20

Closed
ruuts opened this issue Feb 21, 2016 · 2 comments
Closed

Priority #20

ruuts opened this issue Feb 21, 2016 · 2 comments

Comments

@ruuts
Copy link

ruuts commented Feb 21, 2016

Hi @tawan!

Any idea how to implement some sort of priority system for messages?
With delayed job you can give the job a priority. So it will be processed with precedence above others.

In Beanstalk I can imagine the following:

  • Make multiple worker environments
  • One with more app servers than the other so jobs will be processed quicker.
  • Send jobs to a different queues.

Is there a better way?

@tawan
Copy link
Collaborator

tawan commented Feb 22, 2016

Hi @ruuts,
I would implement it as you have explained it. Amazon SQS does not provide a mechanism to change the order of messages in a queue itself. I also think that the docs mention that your approach is the way to go.

You can also play with the auto-scale settings. If load increases, let the worker env spawn more instances. Maybe it also makes sense to have a queue for fast running jobs (like emails), and a queue for heavy slow jobs.

In the end it depends on the budget. Each additional worker environment means at least one EC2 micro instance.

@ruuts
Copy link
Author

ruuts commented Feb 22, 2016

@tawan alright thanks for the info! I think we will start of with one queue and fine tune when everything is being used in production.

@tawan tawan closed this as completed Feb 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants