[Serverless Knative] Knative Docs - Configuring the requests per second (RPS) target

Configuring the requests per second (RPS) target

This setting specifies a target for requests-per-second per replica of an application.

  • Global key: requests-per-second-target-default

  • Per-revision annotation key: autoscaling.knative.dev/target (your revision must also be configured to use the rps metric annotation)

  • Possible values: An integer.

  • Default: "200"

Example:

Per Revision

1
2
3
4
5
6
7
8
9
10
11
12
13
14
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-go
namespace: default
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/target: "150"
autoscaling.knative.dev/metric: "rps"
spec:
containers:
- image: gcr.io/knative-samples/helloworld-go

Global (ConfigMap)

1
2
3
4
5
6
7
8

apiVersion: v1
kind: ConfigMap
metadata:
name: config-autoscaler
namespace: knative-serving
data:
requests-per-second-target-default: "150"

Global (Operator)

1
2
3
4
5
6
7
8
9

apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: knative-serving
spec:
config:
autoscaler:
requests-per-second-target-default: "150"

References

[1] Configuring the requests per second (RPS) target - Knative - https://knative.dev/docs/serving/autoscaling/rps-target/

[2] Home - Knative - https://knative.dev/docs/

[3] Configuring targets - Knative - https://knative.dev/docs/serving/autoscaling/autoscaling-targets/

[4] Configuring metrics - Knative - https://knative.dev/docs/serving/autoscaling/autoscaling-metrics/