Is your feature request related to a problem? Please describe.
Sometimes endpoints are called rarely but are still needed. These apps will be idling large part of their time wasting resources unnecessarily.
Describe the solution you'd like
In these cases it might be possible to safe resources if autoscaler was able to scale down to 0 instances of an app and only scale up to 1 if an incoming request to that app arrives. Obviously the latency of a "waking" request would be high or it might even return an error code indicating a retry-able error.
Describe alternatives you've considered
On CF days 2025 I discussed with @silvestre different option to implement:
-
Via route service: Route service would intercept traffic for apps that require this feature. If a requests arrives the route service would need to check if a running instance of the app is available. If not it would tell autoscaler to scale up.
-
Via "capturing" the apps route ofter downscaling to 0: The autoscaler after scaling down to 0 would register the apps route (or reroute by other means) so that the next request to the app can be used as a trigger to scale up to 1, give back the route and if possible re-issue the request.
Option "via capturing" seems less intrusive so should be preferred if possible.
Additional context
This feature would bring CF closer to a "function as a service (FaaS)" offering which would be great!
Duplicate of 3962 probably raised in the wrong repository.
Is your feature request related to a problem? Please describe.
Sometimes endpoints are called rarely but are still needed. These apps will be idling large part of their time wasting resources unnecessarily.
Describe the solution you'd like
In these cases it might be possible to safe resources if autoscaler was able to scale down to 0 instances of an app and only scale up to 1 if an incoming request to that app arrives. Obviously the latency of a "waking" request would be high or it might even return an error code indicating a retry-able error.
Describe alternatives you've considered
On CF days 2025 I discussed with @silvestre different option to implement:
Via route service: Route service would intercept traffic for apps that require this feature. If a requests arrives the route service would need to check if a running instance of the app is available. If not it would tell autoscaler to scale up.
Via "capturing" the apps route ofter downscaling to 0: The autoscaler after scaling down to 0 would register the apps route (or reroute by other means) so that the next request to the app can be used as a trigger to scale up to 1, give back the route and if possible re-issue the request.
Option "via capturing" seems less intrusive so should be preferred if possible.
Additional context
This feature would bring CF closer to a "function as a service (FaaS)" offering which would be great!
Duplicate of 3962 probably raised in the wrong repository.