A service can respond to most visitors while some requests fail. Use the total request count and the failures in the same time window to estimate what share of observed requests failed.
Service Monitoring · Lesson 3
Availability and Errors
Learn to compare request errors using a time window and total request count.
Calculating the Error Rate
The error rate divides the number of failed requests by the number observed. Multiply by 100 to express it as a percentage.
Window Requests Failures
09:00–09:05 100 2
09:05–09:10 20 2
The first window has two failures per hundred requests, or 2 percent. The next window also has two failures, this time out of twenty requests, or 10 percent.
Which window had a larger share of failures?
Choosing Equal Scope
Keep the time window, route, and definition of failure in view. A health endpoint may answer successfully even while a page that needs a dependency fails. If you are checking the experience of people using the page, count requests for that page.
The health endpoint always returns success, but shoppers report errors on checkout. What should you examine?
Interpreting Low Traffic
If two requests arrive and one fails, the observed rate is 50 percent. That result describes the sample. A few requests can produce large swings, so keep the count next to the percentage. With zero requests, an error percentage for real traffic is undefined. A separate scheduled test can still tell you whether a request succeeded.
A window has no visitor requests. What should you report about the visitor error percentage?
Lesson complete
You finished Availability and Errors
You can now explain an error rate with the context it needs.
Compare failures to total requests in the same window.
Match the route and definition of failure to the question.
Keep counts visible when traffic is sparse.
Keep your learning progress
Create a free account to save this lesson and continue learning on any device.
Create a free account