Re: App autosleep support


Klevenz, Stephan <stephan.klevenz@...>
 

Hi Guillaume,

We have a similar motivation for such feature request for saving resources. We tried that our with a quickly implement POC and made similar experience as you have written in the document. Here is in short what we did:

* measure inactivity of an app – we took the time stamp of last log entry for an application and compared it with a fresh-hold – for the POC this was good enough but maybe a better measure is needed
* inactive apps – stop application and let all app routes point to a watch dog application
* watch dog – if a route is accessed then the watch dog wakes up the app, moves routes back to the app and redirects the request after app is up again

We played also with CPU, number of requests and other measures to scale up and down applications.

Challenges we did identify were:

* find the right measure for inactive apps
* start, stop or scale apps require permissions
* enable the feature only for dedicated orgs or spaces (e.g. a trial org)
* quick wakeup of app
* a deeper integration into CF could make sense (get better measures, better permission control, configure thresh hold for apps via CF CLI …)

We did implement this POC on top to the CC API. Using such feature in production will cause more issues and findings.

Regards,
Stephan


Von: Guillaume Berche
Antworten an: "Discussions about Cloud Foundry projects and the system overall."
Datum: Donnerstag, 30. Juli 2015 12:46
An: cf-dev
Betreff: [cf-dev] App autosleep support

Hi,

I wonder if there are plans to implement an auto-sleep behavior in cloudfoundry, in which inactive apps would be automatically stopped after a max inactivity threshold, and automatically restart upon arrival of traffic on their routes. Similar to google app engine default behavior [1]

I did not find mentions of this yet in mailing lists and trackers.

We feel at Orange that such feature can improve the density for some of our non-prod use-cases (with environmental and financial benefits).

I'd like to know if someone in the community already worked on such feature or would be interested in collaborating on an opensource implementation.

I drafted some specs for a java-based implementation we're planning to work on [2]. I'd love to hear feedbacks and suggestions on this.

Thanks in advance,

Guillaume.

[1] https://cloud.google.com/appengine/docs/java/modules/
[2] https://docs.google.com/document/d/1tMhIBX3tw7kPEOMCzKhUgmtmr26GVxyXwUTwMO71THI/edit#

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.