Chapter 17. Testing for Reliability
If you haven’t tried it, assume it’s broken.
Unknown
One key responsibility of Site Reliability Engineers is to quantify confidence in the systems they maintain. SREs perform this task by adapting classical software testing techniques to systems at scale.1 Confidence can be measured both by past reliability and future reliability. The former is captured by analyzing data provided by monitoring historic system behavior, while the latter is quantified by making predictions from data about past system behavior. In order for these predictions to be strong enough to be useful, one of the following conditions must hold:
-
The site remains completely unchanged over time with no software releases or changes in the server fleet, which means that future behavior will be similar to past behavior.
-
You can confidently describe all changes to the site, in order for analysis to allow for the uncertainty incurred by each of these changes.
Testing is the mechanism you use to demonstrate specific areas of equivalence when changes occur.2 Each test that passes both before and after a change reduces the uncertainty for which the analysis needs to allow. Thorough testing helps us predict the future reliability of a given site with enough detail to be practically useful.
The amount of testing you need to conduct depends on the reliability requirements for your system. As the percentage of your codebase ...
Get Site Reliability Engineering now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.