Comments (3)
Hi @daraghlowe, I will take a look on what you report about activation-scale
and will get back to you.
from serving.
Hi @daraghlowe
We did some testing with using activation-scale but it doesn't solve the problem as the service can scale down to 1 replica when its active if it doesn't get enough request concurrency after initially activating and scaling up to 2. The description of the PR that was merged seems to indicate that it should work like we want it however, but it doesn't.
According to the docs the behavior is:
This value controls the minimum number of replicas that will be created when the Revision scales up from zero. After the Revision has reached this scale one time, this value is ignored. This means that the Revision will scale down after the activation scale is reached if the actual traffic received needs a smaller scale.
Also in the PR: "This annotation will not impact initial-scale values, as it will only apply on subsequent scales from zero."
Now in the code we have:
if a.deciderSpec.ActivationScale > 1 {
logger.Debug("Considering Activation Scale")
if dspc > 0 && a.deciderSpec.ActivationScale > desiredStablePodCount {
...
if dspc is > 0 due to traffic come in and also revision is active I am wondering why you don't see two pods.
I did try it and don't see less pods, using:
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: autoscale-go
namespace: default
spec:
template:
metadata:
annotations:
# Target 10 in-flight-requests per pod.
autoscaling.knative.dev/target: "10"
autoscaling.knative.dev/activation-scale: "2"
autoscaling.knative.dev/target-burst-capacity: "10"
spec:
containers:
- image: ghcr.io/knative/autoscale-go:latest
Could you enable debug logging for the autoscaler and paste the output also provide more details like the ksvc you used?
cc @psschwei @dprotaso if they have more ideas.
from serving.
Hi @skonto
I did some additional testing and confirmed that the activation-scale annotation does work as you mentioned. As long as the revision is receiving traffic (i sent one request per 5s) then it will stay scaled up to the the number of replicas set in the activation-scale
annotation.
If the revision doesn't receive traffic then it will scale down to 1 replica and it will scale back up to 2 (activation-scale) as soon as you send 1 request.
We were testing in our dev environment where the revision wasn't receiving any traffic and when we saw the replicas scale down from 2 to 1, we misunderstood how it was working as we expected that it would always stay at minimum of 2 replicas and when it scaled down, it would scale down directly to zero rather than scale down to 1 replica first.
Thanks for investigating this and clarifying how it works!
from serving.
Related Issues (20)
- knative-serving v1.10.6 webhook pods failing due to "server key missing" missing error HOT 3
- Clean up certmanager conformance tests HOT 1
- Istio periodic tests are failing HOT 8
- Serving https tests are flaky HOT 1
- Only one pod will be created when send multiple requests
- Istio prow job is running with a wrong flag (mesh vs. no-mesh) HOT 1
- TestTLSCertificateRotation is flakey HOT 13
- The Condition of SKS with type name "ActivatorEndpointsPopulated" is not marked accurate, ignoring the scenario of no activator endpoints HOT 2
- [flaky] test/e2e/systeminternaltls.TestTLSCertificateRotation HOT 2
- [flaky] kubetest2.Up HOT 2
- [flaky] test/conformance/api/v1.TestProjectedSecretVolume HOT 2
- Unable to fetch image "ghcr.io/knative/helloworld-go:latest" HOT 7
- Multiple Domains with Wildcard Certs HOT 4
- Pass env variable into queue-proxy container HOT 2
- revision_request_latencies_bucket duration time of queue-proxy HOT 1
- Allow specifying different issuers for different Services
- Properly Handle Pods with schedulingGates HOT 7
- How to add initial delay for Activator Probing time HOT 6
- Support for Resource Claims and DRA HOT 1
- Revision get active before replicas are ready
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serving.