flowhub / guv

Autoscaling for Heroku/AMQP
https://guvscale.com
MIT License
25 stars 6 forks source link

Address issue with tight deadlines. #220

Closed timlesallen closed 6 years ago

timlesallen commented 6 years ago

Addresses https://github.com/flowhub/guv/issues/94

jonnor commented 6 years ago

Rebased and merged now, thanks!

I had to create some tools to evaluate the effects of this change. See the Python notebook, before: https://github.com/flowhub/guv/blob/ff3d66a5a57029b16004ba12f01f03d22206ae07/doc/Scaling.ipynb after: https://github.com/flowhub/guv/blob/c3fe1ab5d500e45cafa45955e8a46aa99027831a/doc/Scaling.ipynb

In practice this bounds the number of workers used in tight deadline situations to the number of messages, which is the correct thing to do (ignoring attempts at overprovisioning due to potential-future-needs). Just checked locally also that it behaves correct when concurrency is >1, then it is bounded to messages/concurrency (each worker can handle upto N messages concurrently in same time).

jonnor commented 6 years ago

Released in guv 0.3.0