You support a high-traffic web application and want to ensure that the home page loads in a timely manner. As a first step, you decide to implement a Service Level Indicator (SLI) to represent home page request latency with an acceptable page load time set to 100 ms. What is the Google-recommended way of calculating this SLI?
A. Bucketize the request latencies into ranges, and then compute the percentile at 100 ms.
B. Bucketize the request latencies into ranges, and then compute the median and 90th percentiles.
C. Count the number of home page requests that load in under 100 ms, and then divide by the total number of home page requests.
D. Count the number of home page requests that load in under 100 ms, and then divide by the total number of all web application requests.
Disclaimer
This is a practice question. There is no guarantee of coming this question in the certification exam.
Answer
C
Explanation
A. Bucketize the request latencies into ranges, and then compute the percentile at 100 ms.
(Not relevant to home page)
B. Bucketize the request latencies into ranges, and then compute the median and 90th percentiles.
(Not relevant to home page)
C. Count the number of home page requests that load in under 100 ms, and then divide by the total number of home page requests.
(https://sre.google/workbook/slo-document/
Check the “Latency” section.
The proportion of sufficiently fast requests, as measured from the load balancer metrics.
“Sufficiently fast” is defined as < 400 ms, or < 850 ms.
The count of “api” http_requests with a duration less than or equal to “0.4” seconds divided by count of all “api” http_requests)
D. Count the number of home page requests that load in under 100 ms, and then divide by the total number of all web application requests.
(We are calculating SLI for only home page, dividing by total number of all web application requests is unwanted here.)