4

I have an application that processes a lot of data but has very few visitors.

I need about 4 dynos when I have visitors but I don't have visitors every day.

Is there a way to add dynos from my rails app when one logs in?

Thanks.

ndemoreau
  • 3,849
  • 4
  • 43
  • 55

1 Answers1

3

There are a couple of things you could Try for this:

  1. Heroku Plugin: adept-scale - Auto scales the web dynos when required

  2. Rails gem (just a proof of concept currently): heroku-autoscale - you will need to put in effort to implement this

  3. Web service: hirefire - Can schedule on which days you need more Dynos

Some Stackoverflow links for Question like these:

OR

Using Heroku Platform API via Ruby code on Login:

Community
  • 1
  • 1
Sahil kalra
  • 8,344
  • 4
  • 23
  • 29
  • I had a look at these different options but they don't really address my need. I need to be able to raise the number of dyno's when somebody logs-in. Thx. – ndemoreau May 30 '14 at 07:21
  • One way is to Call "heroku ps:scale" from the ruby code when someone logs in,,, but there will be a problem that heroku toolbelt won't be installed on the Web dyno,,, You could also look into Heroku if it provide an API (i.e which heroku toolbelt uses) and use curl from the code to scale dynos.. – Sahil kalra May 30 '14 at 07:30
  • 1
    have a look into Dyno Platform API of Heroku, This could be used : https://devcenter.heroku.com/articles/platform-api-reference#dyno and formation API, which could be used to scale Dynos: https://devcenter.heroku.com/articles/platform-api-reference#formation – Sahil kalra May 30 '14 at 07:33