Re: App autosleep support

James Bayer

this feature request has come up occasionally, but rarely. this type of
feature is usually the most applicable to service providers with a free or
very low cost tier, where this can make a substantial difference in
increasing density.

you should consider rescheduling when moving out of the dormant state
(which may take awhile to send the container image to a new host), then you
have to account for resource reservations on the Cells anyway in case they
all wake up. one possibility is the common case to have the container image
pre-staged on a host and the Cell typically would have enough resources
available. in the case where it doesn't, then you reschedule and hold the
requests (up to a max # of requests for that app) longer. has some
interesting potential for DOS if not constrained.

the use of a route-service for implementation is an interesting idea, but
it does mean that every request for the app needs to go through a route
service even when the app is not sleeping, so i could also see other
alternative designs that stay out of the request path unless the app is
dormant. maybe that's something the system could do (after inactivity
period bind the app to a route-service) and when leaving the dormant state,
unbind the app from the route service.

it's probably most important to define "the what and why" of this feature
first, and then we can ask the routing eng team if they have ideas on how
to implement or if it makes sense as existing points of extension like a
service and the in-progress route service.

On Thu, Jul 30, 2015 at 5:58 PM, Gwenn Etourneau <getourneau(a)>

For the autosleep feature why not but again only for non-prod application.

In my previous company, for DEV environment we stop application which have
been not updated since one month except some exception.
We considered that DEV is for active development.
Was just a batch script looking in the CCDB and calling cf-cli to stop

On Thu, Jul 30, 2015 at 7:46 PM, Guillaume Berche <bercheg(a)>


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

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,



cf-dev mailing list

cf-dev mailing list

Thank you,

James Bayer

Join { to automatically receive all group messages.