serving icon indicating copy to clipboard operation
serving copied to clipboard

Allow service to have scale 0 right after creation

Open vvraskin opened this issue 8 years ago • 12 comments

/area autoscale /area test-and-release /kind feature

Expected Behavior

When a new service is created the number of desired pods is 0.

Actual Behavior

When a new service is created the number of desired pods is 1 by default.

Steps to Reproduce the Problem

  1. kubectl apply -f helloworld-go.yml
  2. kubectl get deployment helloworld-go-00001-deployment
  3. The number of desired pods is 1

Additional Info

It would be great at least for the test purposes to set the initial scale to 0. This would save some time for the auto-scaling end to end tests, so that we don't need to wait for the pod to scale down to measure the time to spin up a new pod. This could be probably done with an annotation (not sure how exactly it should be realised yet).

What do you think guys? cc: @markusthoemmes

vvraskin avatar Oct 26 '18 12:10 vvraskin

/remove-label area/API

vvraskin avatar Oct 26 '18 14:10 vvraskin

/remove-area API

markusthoemmes avatar Oct 26 '18 14:10 markusthoemmes

/remove-area build /remove-area monitoring /remove-area networking /remove-kind bug /remove-kind cleanup /remove-kind doc /remove-kind good-first-issue /remove-kind process /remove-kind question /remove-kind spec

vvraskin avatar Oct 26 '18 14:10 vvraskin

@vvraskin: Those labels are not set on the issue: area/

In response to this:

/remove-area build /remove-area monitoring /remove-area networking /remove-kind bug /remove-kind cleanup /remove-kind doc /remove-kind good-first-issue /remove-kind process /remove-kind question /remove-kind spec

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

knative-prow-robot avatar Oct 26 '18 14:10 knative-prow-robot

@vvraskin I think there is significant value in booting an application to the point of a successful readinessProbe before declaring it successfully deployed. This is especially valuable in dynamic languages where the "build" process may provide little guarantee that such a thing is even possible.

I'm uncertain of the value of starting at zero vs. quickly scaling down to zero, but the above is my perspective on the value of the value of the latter.

cc @evankanderson @vaikas-google

mattmoor avatar Oct 30 '18 17:10 mattmoor

I believe the motivation is to cut down on time for tests which measure scale up from zero time as currently the minimum scale down time is on the order of 1min and we have a desire to run many scale up from zero tests. I agree that this isn't something users should find valuable - I wonder if we can find some way to backdoor this feature for test cases, maybe an environment var?

greghaynes avatar Oct 30 '18 22:10 greghaynes

@greghaynes if we were to have a backdoor to start scaled at 0, how would you guarantee that the Istio routes have been propagated before starting the test?

josephburnett avatar Oct 30 '18 22:10 josephburnett

I agree that this isn't something users should find valuable

i'm not sure. i as a user wouldn't want to be billed for a container running for a while although it didn't need it during that period of time.

mbehrendt avatar Oct 30 '18 22:10 mbehrendt

@josephburnett right now we probe the application endpoint, similar to the autoscale test

Edit: Sorry I see what youre saying 'before starting the test' - the two thoughts I've seen on this are to check the stats endpoints on envoy or probe our queue application. For testing's sake I think it would still be a useful metric to have even if route propogation was included in startup time as that would give us a consistent number to drill down.

greghaynes avatar Oct 30 '18 22:10 greghaynes

@mbehrendt Usually, for serverless products, I think it should not be billed if there is no request to a existing pod, it depends on how the cloud provider choose to bill.

lvjing2 avatar Nov 03 '18 03:11 lvjing2

Looks like duplicate of #4098 Keeping the newer number /close

vagababov avatar Jun 26 '19 21:06 vagababov

@vagababov: Closing this issue.

In response to this:

Looks like duplicate of #4098 Keeping the newer number /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

knative-prow-robot avatar Jun 26 '19 21:06 knative-prow-robot