Skip to content

Commit 6f1cc29

Browse files
committed
Document exclusions for SLO/SLI API call latency
Signed-off-by: andrewsykim <[email protected]>
1 parent 4d0eb22 commit 6f1cc29

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

sig-scalability/slos/api_call_latency.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
| Status | SLI | SLO |
66
| --- | --- | --- |
7-
| __Official__ | Latency<sup>[1](#footnote1)</sup> of mutating<sup>[2](#footnote2)</sup> API calls for single objects for every (resource, verb) pair, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, for every (resource, verb) pair, excluding virtual and aggregated resources and Custom Resource Definitions, 99th percentile per cluster-day <= 1s |
8-
| __Official__ | Latency<sup>[1](#footnote1)</sup> of non-streaming read-only<sup>[3](#footnote3)</sup> API calls for every (resource, scope<sup>[4](#footnote4)</sup>) pair, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, for every (resource, scope) pair, excluding virtual and aggregated resources and Custom Resource Definitions, 99th percentile per cluster-day: (a) <= 1s if `scope=resource` (b) <= 30s<sup>[5](#footnote5)</sup> otherwise (if `scope=namespace` or `scope=cluster`) |
7+
| __Official__ | Latency of processing<sup>[1](#footnote1)</sup> mutating<sup>[2](#footnote2)</sup> API calls for single objects for every (resource, verb) pair, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, for every (resource, verb) pair, excluding virtual and aggregated resources and Custom Resource Definitions, 99th percentile per cluster-day <= 1s |
8+
| __Official__ | Latency of processing<sup>[1](#footnote1)</sup> non-streaming read-only<sup>[3](#footnote3)</sup> API calls for every (resource, scope<sup>[4](#footnote4)</sup>) pair, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, for every (resource, scope) pair, excluding virtual and aggregated resources and Custom Resource Definitions, 99th percentile per cluster-day: (a) <= 1s if `scope=resource` (b) <= 30s<sup>[5](#footnote5)</sup> otherwise (if `scope=namespace` or `scope=cluster`) |
99

10-
<a name="footnote1">\[1\]</a> By latency of API call in this doc we mean time
11-
from the moment when apiserver gets the request to last byte of response sent
12-
to the user.
10+
<a name="footnote1">\[1\]</a> The SLI only measures latency incurred by the processing
11+
time of the request. The processing time of a request is the moment when apiserver gets
12+
the request to last byte of response sent to the user, excluding latency incurred by
13+
webhooks and priority & fairness queue wait times.
1314

1415
<a name="footnote2">\[2\]</a> By mutating API calls we mean POST, PUT, DELETE
1516
and PATCH.
@@ -35,15 +36,15 @@ that users are fine with listing tens of thousands of objects taking more than
3536
- As a user of vanilla Kubernetes, I want some guarantee how quickly I get the
3637
response from an API call.
3738
- As an administrator of Kubernetes cluster, if I know characteristics of my
38-
external dependencies of apiserver (e.g custom admission plugins and webhooks)
39-
I want to be able to provide guarantees for API calls latency to users of my
40-
cluster.
39+
external dependencies of apiserver (e.g custom admission plugins, priority
40+
& fairness configuration, and webhooks). I want to be able to provide
41+
guarantees for API calls latency to users of my cluster.
4142

4243
### Other notes
4344
- We obviously can’t give any guarantee in general, because cluster
44-
administrators are allowed to register custom admission plugins or webhooks,
45-
which we don’t have any control about and they obviously impact API call
46-
latencies.
45+
administrators are allowed to register custom admission plugins, webhooks,
46+
and priority and fairness configurations, which we don’t have any control
47+
about and they obviously impact API call latencies.
4748
- As a result, we define the SLIs to be very generic (no matter how your
4849
cluster is set up), but we provide SLO only for default installations (where we
4950
have control over what apiserver is doing). This doesn’t provide a false
@@ -72,6 +73,8 @@ that all `core` components communicate with apiserver using protocol buffers.
7273
stale data (being served from cache) and the SLO again has to be satisfied
7374
independently of that. This makes the careful choice of requests in tests
7475
important.
76+
- The SLI & SLO excludes latency incurred by factors that are outside our control, specifically
77+
from webhooks (1.23+) and API priority & fairness queue wait times (1.27+).
7578

7679
### TODOs
7780
- We may consider treating `non-namespaced` resources as a separate bucket in

sig-scalability/slos/slos.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ __TODO: Cluster churn should be moved to scalability thresholds.__
114114

115115
| Status | SLI | SLO | User stories, test scenarios, ... |
116116
| --- | --- | --- | --- |
117-
| __Official__ | Latency of mutating API calls for single objects for every (resource, verb) pair, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, for every (resource, verb) pair, excluding virtual and aggregated resources and Custom Resource Definitions, 99th percentile per cluster-day<sup>[1](#footnote1)</sup> <= 1s | [Details](./api_call_latency.md) |
118-
| __Official__ | Latency of non-streaming read-only API calls for every (resource, scope) pair, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, for every (resource, scope) pair, excluding virtual and aggregated resources and Custom Resource Definitions, 99th percentile per cluster-day<sup>[1](#footnote1)</sup> (a) <= 1s if `scope=resource` (b) <= 30s otherwise (if `scope=namespace` or `scope=cluster`) | [Details](./api_call_latency.md) |
117+
| __Official__ | Latency of processing mutating API calls for single objects for every (resource, verb) pair, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, for every (resource, verb) pair, excluding virtual and aggregated resources and Custom Resource Definitions, 99th percentile per cluster-day<sup>[1](#footnote1)</sup> <= 1s | [Details](./api_call_latency.md) |
118+
| __Official__ | Latency of processing non-streaming read-only API calls for every (resource, scope) pair, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, for every (resource, scope) pair, excluding virtual and aggregated resources and Custom Resource Definitions, 99th percentile per cluster-day<sup>[1](#footnote1)</sup> (a) <= 1s if `scope=resource` (b) <= 30s otherwise (if `scope=namespace` or `scope=cluster`) | [Details](./api_call_latency.md) |
119119
| __Official__ | Startup latency of schedulable stateless pods, excluding time to pull images and run init containers, measured from pod creation timestamp to when all its containers are reported as started and observed via watch, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, 99th percentile per cluster-day<sup>[1](#footnote1)</sup> <= 5s | [Details](./pod_startup_latency.md) |
120120
| __WIP__ | Startup latency of schedulable stateful pods, excluding time to pull images, run init containers, provision volumes (in delayed binding mode) and unmount/detach volumes (from previous pod if needed), measured from pod creation timestamp to when all its containers are reported as started and observed via watch, measured as 99th percentile over last 5 minutes | In default Kubernetes installation, 99th percentile per cluster-day<sup>[1](#footnote1)</sup> <= X where X depends on storage provider | [Details](./pod_startup_latency.md) |
121121
| __WIP__ | Latency of programming in-cluster load balancing mechanism (e.g. iptables), measured from when service spec or list of its `Ready` pods change to when it is reflected in load balancing mechanism, measured as 99th percentile over last 5 minutes aggregated across all programmers | In default Kubernetes installation, 99th percentile per cluster-day<sup>[1](#footnote1)</sup> <= X | [Details](./network_programming_latency.md) |

0 commit comments

Comments
 (0)