Diploma in Cloud Computing
Cloud Resource Monitoring and Cost Optimization
•
Diploma
Service Levels and Incident Management
Introduction and Context
Cloud services are valuable only when they remain available, responsive, secure, and fit for purpose. A system may be technically sophisticated yet operationally unsuccessful if users cannot access it when needed or if failures are handled slowly and inconsistently. Service-level management and incident management provide the operational discipline required to connect technical performance with business expectations.
Service-level management defines what level of service is expected, how it will be measured, and what happens when performance falls short. Incident management provides a structured response when an interruption, degradation, security event, or other operational problem occurs. Together, these practices support reliability, customer confidence, regulatory accountability, and responsible cloud spending. For example, detecting a failure early can reduce both downtime and the cost of emergency recovery; however, excessive monitoring or unnecessarily high availability targets can also increase expenditure.
This chapter examines service-level indicators (SLIs), service-level objectives (SLOs), service-level agreements (SLAs), error budgets, health checks, escalation, incident response, root-cause analysis, and post-incident review. The emphasis is practical: a cloud professional should be able to select meaningful measures, interpret them correctly, respond to incidents safely, and use evidence to improve reliability.
Learning Objectives
By the end of this chapter, you should be able to:
Distinguish between SLIs, SLOs, and SLAs.
Calculate availability, latency compliance, and error-budget consumption.
Design useful health checks and monitoring signals.
Explain incident severity, escalation, roles, and communication procedures.
Apply a structured incident-response lifecycle.
Distinguish symptoms, contributing factors, and root causes.
Conduct a blameless post-incident review and convert findings into actions.
Evaluate the reliability, cost, governance, and ethical implications of service-level decisions.
1. The Service-Level Model
1.1 Service-level indicators
An SLI is a quantitative measurement of a user-relevant aspect of a service. Common SLIs include:
availability: the proportion of valid requests that receive an acceptable response;
latency: the time taken to complete an operation, often reported at the 50th, 95th, or 99th percentile;
correctness: the proportion of responses containing the expected result;
throughput: completed requests, transactions, or data units per time interval;
freshness: how recently data was updated;
durability: the likelihood that stored data remains recoverable;
support responsiveness: time until an appropriate support response.
A good SLI has a clear numerator, denominator, population, time window, and acceptance rule. “The system was healthy” is not an SLI because it is vague. “The percentage of successful checkout requests during each calendar month” is measurable, although the definition of “successful” must still be specified.
Availability for request-based services can be expressed as:
Here, a valid request is one that should be served by the system, a good request meets the defined status and latency criteria, and both quantities refer to the same measurement period. Health-check traffic, retries, synthetic probes, and requests rejected before reaching the service must be treated consistently. Availability is not automatically the same as uptime: a server can be reachable while returning incorrect or unusably slow responses.
For a time-based service, availability may instead be calculated as:
Availability = ((Total time − Unavailable time) ÷ Total time) × 100%
The formula applies when periods of service unavailability can be defined reliably. The unit of both time values must be the same, such as minutes per month.
Latency is often summarized with percentiles rather than an average. If the 95th-percentile latency is 420 ms, then at least 95% of measured requests completed in 420 ms or less, subject to the measurement method and dataset. It does not mean that every request took 420 ms, nor that the average was 420 ms. Percentiles are particularly useful when a small number of very slow requests would be hidden by an average.
1.2 Service-level objectives
An SLO is a target for an SLI over a defined period. An example is: “At least 99.9% of valid API requests shall be good during each calendar month.” An SLO is an engineering and operational target, not necessarily a contractual promise.
SLOs should be:
user-centred rather than based only on internal resource metrics;
measurable from trustworthy data;
limited in number so that teams can focus on important outcomes;
associated with a time window and measurement policy;
realistic enough to guide engineering decisions;
reviewed when usage, architecture, or business importance changes.
A target of 100% availability is usually inappropriate. All complex systems experience maintenance, dependency failures, software defects, and unexpected events. A 100% target may encourage hidden measurement exclusions or excessive cost without providing a realistic reliability objective.
1.3 Service-level agreements
An SLA is a formal agreement between a provider and a customer or business unit. It may define service targets, measurement rules, exclusions, support obligations, reporting, remedies, and responsibilities. A cloud provider’s SLA may offer service credits when a published availability commitment is not met. A service credit is not equivalent to recovery of all business losses, and the agreement should be read carefully for eligibility conditions and claim procedures.
The relationship can be summarized as follows:
Concept
Main question
Typical owner
Example
SLI
What do we measure?
Operations and engineering
Percentage of good requests
SLO
What target do we aim to meet?
Service owner
99.9% good requests monthly
SLA
What is formally promised?
Provider and customer
99.9% availability with defined remedy
An organization may set an internal SLO that is stricter than its external SLA. This creates operational margin and reduces the chance of breaching a contractual commitment.
2. Error Budgets and Reliability Decisions
An error budget is the amount of unreliability permitted by an SLO during its measurement window. If the availability objective is A, expressed as a fraction, and the period contains T minutes, the theoretical allowed unavailable time is:
Error budget time = (1 − A) × T
This formula assumes that the SLO is time-based, that unavailability is the relevant failure measure, and that the entire period is measured under the stated policy.
The request-based and time-based budgets are not interchangeable. A service can have brief complete outages or a long period of scattered request failures; the selected SLI determines how these events are represented.
Budget consumption can be calculated as:
Budget consumption = Observed bad events ÷ Allowed bad events
A value of 1 means the entire budget has been consumed. A value greater than 1 indicates that the objective has been missed. Teams may use a burn rate to detect unusually rapid consumption:
A burn rate of 5 means the service is consuming error budget five times faster than the average rate permitted by the SLO. Burn-rate alerts must specify both a rate and an observation window; a short window catches acute incidents, while a longer window reduces noise.
Error budgets create a connection between reliability and delivery. When the budget is healthy, a team may proceed with a controlled release, migration, or architectural experiment. When the budget is nearly exhausted, the team may prioritize reliability work, freeze risky changes, or require additional review. This is not a mechanical rule: security patches, legal obligations, and urgent customer needs may justify action even when the budget is depleted. The decision and its risk should be recorded.
3. Health Checks and Observability
3.1 Types of health checks
A health check is a test used to determine whether a component or service is operating acceptably. Important types include:
Liveness check: asks whether a process is running. Failure may justify restarting it.
Readiness check: asks whether a process can receive traffic, including whether essential dependencies are available.
Startup check: allows slow-starting applications time to initialize before liveness decisions are made.
Synthetic transaction: performs a representative user journey, such as signing in and viewing an account.
Dependency check: tests a database, queue, identity service, or external API, preferably with safeguards against creating harmful load.
A liveness check should not test every dependency. If a database is temporarily unavailable and the application is restarted repeatedly, the result may be a restart loop that makes recovery harder. Readiness checks are generally more appropriate for removing an instance from traffic while preserving the process for diagnosis.
A useful monitoring design combines four kinds of signals:
Metrics, such as request rate, error rate, latency, saturation, and resource utilization.
Logs, which record discrete events and diagnostic context.
Traces, which follow a request across distributed components.
Profiles and events, which help identify resource or code-level behaviour.
The most important alerts describe user impact or a credible risk of impact. CPU utilization alone is rarely sufficient: high CPU may be normal during a batch job, while a service may fail with low CPU because of a broken dependency.
Incident management lifecycle from detection through learning
Figure: Incident management lifecycle from detection through learning
Figure: A continuous incident-management lifecycle. Learning from review feeds improvements to future detection and response.
3.2 Alert quality
An alert should have an owner, a severity, a clear condition, a runbook link, and an expected response time. Alert fatigue occurs when people receive too many low-value notifications and begin ignoring them. Thresholds should be tested against historical behaviour and adjusted when false positives or missed incidents are discovered. Monitoring also creates cost: logs, traces, metrics, storage, retention, and data transfer may be chargeable. Sampling, aggregation, tiered retention, and filtering can reduce cost, but never at the expense of losing evidence needed for safety, compliance, or incident investigation.
4. Incident Management
An incident is an event that causes, or may cause, interruption, degradation, loss of integrity, security exposure, or failure to meet a service objective. A problem is the underlying cause or recurring condition that produces incidents. A change is a planned alteration to a service. These concepts should not be confused: restoring service is the immediate incident objective, while preventing recurrence is problem-management work.
4.1 Severity and prioritization
Severity should be based on impact and urgency, not on which team reports the event. A practical classification is:
Severity
Typical condition
Expected response
SEV1
Widespread outage, major safety/security impact, or critical business interruption
Immediate coordinated response and executive communication
SEV2
Significant degradation affecting an important customer group
Rapid technical response and scheduled stakeholder updates
SEV3
Limited impact or workaround available
Normal on-call response and tracking
SEV4
Minor defect, question, or low-risk issue
Planned resolution through support or backlog
Organizations must define their own thresholds. A small service supporting emergency operations may be SEV1 even if only a few users are affected. Conversely, a large but non-critical internal tool may be lower severity.
4.2 Roles and escalation
A response works best when authority is explicit. The incident commander coordinates decisions and maintains the operational picture. The technical lead directs diagnosis and remediation. The communications lead prepares internal and external updates. A scribe records the timeline, decisions, evidence, and commands. These roles may be combined during a small incident but should be separated during a major event.
Escalation can be time-based, impact-based, or expertise-based. Examples include escalating when the incident exceeds a defined duration, when the affected population increases, when data integrity is uncertain, or when the current team lacks required authority. Escalation is not an admission of failure; it is a control for reducing delay and cognitive overload.
A basic response sequence is:
Detect and acknowledge the event.
Confirm whether the alert is genuine and estimate user impact.
Declare the incident and assign roles.
Stabilize the service using safe, reversible measures.
Diagnose using logs, metrics, traces, recent changes, and dependency status.
Communicate regularly using verified facts and clearly labelled uncertainty.
Recover, validate key user journeys, and monitor for recurrence.
Close the incident only when ownership of follow-up work is established.
During response, responders should avoid destructive experimentation, unreviewed production commands, and speculative public statements. A rollback, traffic shift, feature disablement, or capacity increase may restore service, but each action has risks and should be recorded.
4.3 Communication
Good incident communication is concise, factual, and audience-appropriate. An initial update should state what is affected, when it began, what users may experience, what is being done, and when the next update will occur. It should not expose confidential information or blame individuals. Customer support, legal, security, and regulators may need different information and timelines. Security incidents require special care because disclosure obligations can depend on jurisdiction, contract, and the type of data involved.
5. Root-Cause Analysis and Post-Incident Review
5.1 From symptom to cause
A symptom is an observed effect, such as elevated HTTP 503 responses. A proximate cause may be exhausted database connections. A contributing factor may be an inefficient query introduced in a recent release. A systemic cause may be the absence of load testing or an unsafe deployment control. Root-cause analysis should look beyond the first technical fault to the conditions that allowed the fault to produce customer impact.
Useful techniques include:
Timeline analysis: aligns alerts, changes, actions, and effects.
Five whys: repeatedly asks why an outcome occurred, while avoiding simplistic or personal conclusions.
Fault-tree analysis: starts with an undesirable event and decomposes combinations of causes.
Change correlation: compares the incident with deployments, configuration changes, traffic shifts, and dependency events.
Causal graphs: distinguish necessary conditions, contributing conditions, and independent coincidences.
A root cause is not always a single item. Distributed systems often fail through interacting conditions. The analysis should state confidence levels and identify evidence that would confirm or disprove a hypothesis.
5.2 The blameless review
A blameless review does not mean that accountability disappears. It means that the investigation focuses on decisions, system design, incentives, procedures, and information available at the time rather than humiliating individuals. People who fear punishment are less likely to report near misses and operational weaknesses.
A useful post-incident review includes:
incident summary and customer impact;
start, detection, escalation, mitigation, recovery, and closure times;
SLI and error-budget effect;
technical and organizational contributors;
actions that reduced impact and actions that delayed recovery;
what went well and what did not;
corrective and preventive actions, each with an owner and due date;
evidence that actions are complete and effective.
Actions should be specific and testable. “Improve monitoring” is weak. “Add a readiness check for the payment dependency, test it in staging, and alert on five consecutive failures by 30 June” is stronger. Corrective actions may include code changes, safer deployment, capacity planning, runbook updates, training, access-control changes, or revised customer communication.
6. Worked Example: Interpreting an Availability SLO
A document-processing API defines “good” as a valid request that returns the correct result within 2 seconds. During a 30-day month it receives 1,250,000 valid requests. Monitoring records 1,247,750 good requests.
Observed bad requests are 1,250,000 − 1,247,750 = 2,250. Therefore, budget consumption is:
Budget consumption = 2,250 ÷ 1,250 = 1.8
The team consumed 180% of its request-based error budget and missed the SLO. Investigation should determine whether the failures were concentrated in one release, one region, a dependency, or a particular customer workflow. The calculation alone identifies the performance result; it does not explain the cause.
7. Illustrative Case: Regional Checkout Incident
Background
A fictional online retailer operates a multi-region checkout service. Its internal SLO is 99.95% good checkout requests per month, while its customer-facing SLA promises 99.9% availability. The service uses a payment provider, a managed database, and automated regional traffic routing.
Problem
After a routine configuration deployment, checkout errors rise in one region. A CPU alert does not trigger because utilization remains moderate, but the SLI alert detects an increase in failed requests. Customers receive intermittent payment errors.
Analysis
The incident commander declares SEV2 because a substantial customer group is affected but another region remains healthy. Traces show that the affected application version is opening database connections with an invalid timeout. The database is healthy, but connection retries accumulate and exhaust the application connection pool. The deployment is identified as the initiating change; inadequate configuration validation and the absence of a representative synthetic checkout are contributing factors.
Approach and solution
The team first shifts traffic to the healthy region, reducing immediate customer impact. It then rolls back the configuration, verifies successful test purchases, and gradually restores traffic. The communications lead provides updates every 30 minutes. The scribe records routing actions, error rates, and validation evidence. Security and finance teams confirm that failed payment attempts did not create duplicate charges.
Outcome
Service is restored after 27 minutes. The post-incident review finds that the external SLA was not breached, but the internal SLO error budget was substantially consumed. Actions include schema validation for connection settings, a canary deployment policy, a synthetic checkout test, an alert on connection-pool exhaustion, and a runbook for regional traffic shifting.
Learning points
The incident demonstrates that resource utilization is not a sufficient service indicator, that dependency health and user journeys must be monitored, and that internal SLOs can provide early warning before an external SLA breach. It also shows why incident response must verify business outcomes, such as payment correctness, rather than merely checking whether servers are running.
8. Governance, Ethics, Cost, and Contemporary Practice
Service-level measurements influence contracts, budgets, staff workload, and customer trust. Organizations should not manipulate measurement boundaries to appear more reliable. Excluding inconvenient failures, hiding maintenance, or redefining “good” requests after an incident undermines governance. Measurement policies should be documented, reviewable, and applied consistently.
Privacy must be considered in logs, traces, and synthetic tests. Personally identifiable information, payment data, authentication tokens, and health information should not be copied into diagnostic systems unnecessarily. Access should follow least privilege, retention should have a justified purpose, and sensitive values should be masked or encrypted. Incident records themselves may contain security-sensitive information.
Artificial intelligence can assist with anomaly detection, log clustering, alert summarization, dependency mapping, and draft incident timelines. However, AI-generated explanations can be confidently wrong, and automated remediation may amplify a fault. Human responders should validate evidence, preserve auditability, protect confidential data, and define limits for automated actions. AI should support—not replace—incident command and professional judgment.
Contemporary cloud practice increasingly emphasizes resilience engineering, controlled fault injection, automated rollback, distributed tracing, platform engineering, and SLO-based delivery governance. These techniques are valuable only when they are introduced proportionately. A small service may need a simple dashboard and tested runbook rather than an expensive observability platform. Reliability investment should be guided by customer impact, risk, regulatory obligations, and the cost of failure.
9. Best-Practice Checklist
Define SLIs from user-visible outcomes.
Document measurement boundaries, exclusions, units, and time windows.
Set SLOs that are challenging but realistic; avoid automatic 100% targets.
Keep external SLAs and internal SLOs clearly distinguished.
Use error budgets to inform, not blindly dictate, engineering priorities.
Alert on symptoms and user impact, not only infrastructure utilization.
Separate liveness from readiness checks.
Maintain tested runbooks and clear escalation paths.
Assign incident roles and record decisions during major incidents.
Communicate verified facts, impact, actions, and next update times.
Prefer reversible mitigation during active response.
Perform blameless, evidence-based reviews.
Give every improvement action an owner, due date, and verification method.
Control observability cost and protect sensitive data.
Test recovery procedures before an emergency occurs.
Chapter Summary
Service-level management translates customer expectations into measurable indicators, objectives, and contractual commitments. SLIs measure outcomes; SLOs define internal targets; and SLAs formalize obligations and remedies. Availability and error-budget calculations are meaningful only when their populations, units, time windows, and acceptance rules are explicit.
Error budgets provide a practical way to balance reliability with change. Health checks should distinguish process liveness from readiness to serve traffic, while observability should combine metrics, logs, traces, and carefully designed synthetic tests. Incident management depends on severity classification, clear roles, timely escalation, safe mitigation, accurate communication, and validation of business outcomes.
Root-cause analysis must examine technical and organizational contributors rather than stop at the first visible fault. Blameless post-incident reviews convert experience into measurable improvements. Finally, service-level decisions must account for cost, privacy, security, contractual obligations, regulatory requirements, and the limitations of automation and AI.
Key Terms
SLI: A quantitative indicator of a service characteristic.
SLO: A target value or range for an SLI over a specified period.
SLA: A formal service agreement defining commitments, measurement, and remedies.
Availability: The proportion of time or valid requests for which a service meets its availability definition.
Latency: The time required to complete an operation.
Percentile: A value below which a specified percentage of observations fall.
Error budget: The permitted amount of unreliability under an SLO.
Burn rate: The speed at which an error budget is being consumed relative to its permitted rate.
Health check: A test of service or component health.
Liveness: Whether a process is running.
Readiness: Whether a process is able to receive and successfully handle traffic.
Observability: The ability to understand internal system behaviour from outputs such as metrics, logs, and traces.
Incident: An event causing or threatening service degradation, interruption, or harm.
Incident commander: The person coordinating an incident response.
Escalation: Transfer or expansion of responsibility when impact, duration, or complexity requires it.
Root cause: A fundamental condition whose removal would reduce recurrence of an outcome.
Runbook: A documented procedure for diagnosing or operating a service.
Blameless review: An evidence-based review focused on system improvement rather than personal blame.
Synthetic transaction: An automated test that imitates a representative user action.
Change management: The controlled planning, authorization, implementation, and review of service changes.
Review Questions
Short Answer Questions
What is the difference between an SLI and an SLO?
Why is a readiness check generally different from a liveness check?
What is an error budget?
Name three common roles in a major incident response.
Why should incident reviews be blameless?
Long Answer Questions
Explain the relationship among SLIs, SLOs, and SLAs, using an API availability example.
Describe the incident-response lifecycle from detection through post-incident learning.
Discuss how error budgets can guide release and reliability decisions.
Explain how metrics, logs, traces, and synthetic transactions complement one another.
Describe the contents of a high-quality post-incident review and explain why each is useful.
Analytical / Application Questions
A service receives 800,000 valid requests and records 1,600 bad requests. Its SLO is 99.9%. Calculate availability, allowed bad requests, and error-budget consumption. Decide whether the SLO was met.
A service shows normal CPU utilization but customers report failed transactions. Propose an investigation plan using SLIs, health checks, logs, traces, and dependency analysis.
Design a severity and escalation policy for a cloud service that supports an online examination platform. Justify your severity criteria, communication schedule, and recovery priorities.
Multiple Choice Questions with Answers
Question 1
Which statement correctly describes an SLI?
A. A formal contractual remedy for poor service
B. A quantitative measurement of a user-relevant service characteristic
C. A list of engineers assigned to an incident
D. A target that must always equal 100 percent
Correct Answer: B. A quantitative measurement of a user-relevant service characteristic
Question 2
A service has a 99.9% availability objective in a 30-day month. What is its theoretical time-based error budget?
A. 4.32 minutes
B. 43.2 minutes
C. 432 minutes
D. 4,320 minutes
Correct Answer: B. 43.2 minutes
Question 3
Which check determines whether an instance should receive production traffic?
A. Readiness check
B. Liveness check
C. Code-style check
D. Cost-allocation check
Correct Answer: A. Readiness check
Question 4
What is the principal purpose of an error budget?
A. To guarantee that no incident can occur
B. To replace all service-level agreements
C. To balance reliability work with controlled change
D. To measure only cloud storage consumption
Correct Answer: C. To balance reliability work with controlled change
Question 5
Which role coordinates the overall response and maintains the operational picture during a major incident?
A. Database administrator
B. Incident commander
C. Procurement officer
D. External auditor
Correct Answer: B. Incident commander
Question 6
A service receives 100,000 valid requests and 150 are bad. What is its availability under a request-based definition?
A. 99.15%
B. 99.50%
C. 99.85%
D. 99.95%
Correct Answer: C. 99.85%
Question 7
Which is the strongest example of a post-incident action?
A. Improve monitoring someday
B. Ask everyone to be more careful
C. Add a tested dependency readiness alert with an owner and due date
D. Delete all incident records
Correct Answer: C. Add a tested dependency readiness alert with an owner and due date
Question 8
Why can CPU utilization alone be a poor incident indicator?
A. CPU is never measurable in cloud systems
B. A service may fail because of dependencies while CPU remains normal
C. CPU always measures customer satisfaction directly
D. High CPU proves that all requests are successful
Correct Answer: B. A service may fail because of dependencies while CPU remains normal
Question 9
What is the main purpose of a blameless post-incident review?
A. To avoid recording technical evidence
B. To identify a person to punish
C. To improve systems and processes using evidence without personal blame
D. To eliminate the need for corrective actions
Correct Answer: C. To improve systems and processes using evidence without personal blame
Question 10
If observed bad events are 2,000 and the allowed budget is 1,000, what is budget consumption?
A. 0.5
B. 1
C. 2
D. 3
Correct Answer: C. 2
Cloud Resource Monitoring and Cost Optimization
Chapter 6
of 14