GithubHelp home page GithubHelp logo

markquezada / heroku-resque-auto-scale Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 31.0 257 KB

Auto scale your resque workers on Heroku. Original code by darkhelmet.

Home Page: http://blog.darkhax.com/2010/07/30/auto-scale-your-resque-workers-on-heroku

License: MIT License

Ruby 100.00%

heroku-resque-auto-scale's People

Contributors

conroywhitney avatar dquimper avatar markquezada avatar vicentemundim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

heroku-resque-auto-scale's Issues

I cant use this gem cause resque version

Bundler could not find compatible versions for gem "resque":
In Gemfile:
heroku-resque-auto-scale (>= 0) ruby depends on
resque (~> 1.10.0) ruby

resque (1.23.0)

in-progress workers can be killed by the scale down

It appears that in-progress workers can be killed when scaling down. E.g., imagine there are 5 jobs and 5 workers processing them. Each of the 5 workers picks up a job, and now there are none left in the queue. If these jobs take some time, but one job finishes finishes before the rest, it will run its after_perform_scale_down method and see there are no jobs remaining. It does not take into account the running jobs, so Scaler.workers is set to 0. This kills the other 4 jobs that are in progress.

It appears that we need to take into account the count of running jobs as well as the ones in the queue. But, I don't think heroku is smart enough to kill idle workers before working ones. So it appears you can only really reduce the number of workers without data loss when the number of active workers is 1. That worker would be the one that is in the after_perform_scale_down method, so its work is already done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.