Overview of Incident Lifecycle in SRE
Tags: sre, incidentmanagement, bestpractices
Published: 2021-03-02 12:09:05

_Incidents that disrupt services are unavoidable. But every breakdown is an opportunity to learn & improve. Our latest blog is a deep dive into best practices to follow across the lifecycle of an incident, helping teams build a sustainable and reliable product - the SRE way_

As the saying goes, “Every problem we face is a blessing in disguise”. On similar lines, every incident in system infrastructure,  helps product development & engineering teams understand better about the capabilities of system architecture. This can further help organizations in building a sustainable and reliable product.

In this blog, we are quantifying all complexities of handling an incident in a well-structured format with an intent to help you handle every incident effectively.

<ul>
	<li><a href="#incident">What is an incident?</a></li>
	<li><a href="#lifecycle">What is the lifecycle of an incident?</a>
  	<ul style="margin-bottom: 0px;">
    	<li><a href="#itil">ITIL definition on Incident</a>
      	<ul style="margin-bottom: 0px;">
        	<li><a href="#identification">Incident Identification, Logging, and Categorisation</a></li>
          <li><a href="#notification">Incident Notification, Assignment, or Escalation</a></li>
          <li><a href="#investigation">Incident Investigation and diagnosis</a></li>
          <li><a href="#resolution">Incident Resolution and Recovery - The OODA Loop</a></li>
          <li><a href="#closure">Incident closure</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#bestpractices">What are some of the best practices in incident management?</a>
  	<ul style="margin-bottom: 0px;">
    	<li><a href="#recursive">Recursive Delegation of Roles and Responsibilities</a>
      	<ul style="margin-bottom: 0px;">
        	<li><a href="#command">How does Incident Command System Work?</a></li>
        </ul>
      </li>
      <li><a href="#centralised">Centralised and Designed War Room for Incident Response Taskforce</a></li>
      <li><a href="#live">Maintaining a Live (Real-time) Incident State Document</a></li>
      <li><a href="#handoff">Live Handoff across Incident Management Team</a></li>
      <li><a href="#strategy">Incident Management Strategy and Best Practices</a></li>
      <li><a href="#rca">Postmortems and Root Cause Analysis (RCA)</a>
      	<ul style="margin-bottom: 0px;">
        	<li><a href="#postmortem">Postmortem Best Practices</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="#conclusion">Conclusion</a></li>
</ul>

<h3 id="incident">What is an incident?</h3>

ITIL 2011 defines Incident as,

_“an unplanned interruption to an IT service or reduction in the quality of an IT service or a failure of a Configuration Item that has not yet impacted an IT service [but has potential to do so]”_

Clearly, in order to maintain acceptable service levels, it is important to resolve incidents and restore normal services as quickly as possible.

<h3 id="lifecycle">What is the lifecycle of an incident?</h3>

ITIL defines a standard lifecycle of an incident. While the actual activities that occur during each phase have changed over time, it is still a good starting point for a detailed description of incidents.

<span id="itil"></span>
<ul><li><h3 id="identification">Incident Identification, Logging, and Categorisation</h3></li></ul>
Incidents are identified through reports from monitoring systems, or by manual identification. Once an incident is identified it is logged. An incident log can be used to validate that all incidents have been addressed and to identify trends. At this point, the incident is categorized by adding additional information like severity, functional area, and ownership. These three activities were once the responsibility of a first-level monitoring technician, nowadays they are normally automated.

<ul><li><h3 id="notification">Incident Notification, Assignment, or Escalation</h3></li></ul>

This stage is about notifying the right people to address an incident. In many modern environments identifying the correct responders can be a complex process. Similarly, many organizations have elaborate escalation processes to get specialists or SMEs when the initial responders need help. [Modern incident management systems](https://www.squadcast.com/it-incident-management-tools) can reduce turnaround times by using rules to automate this.

<ul><li><h3 id="investigation">Incident Investigation and Diagnosis</h3></li></ul>
Once notified, incident responders, gather information about the incident using [observability tools](https://www.squadcast.com/blog/top-observability-tools-for-devops-engineers-and-sres). In addition to the current state of the system, RCAs of similar incidents in the past can be valuable sources of data. This information is used to build a hypothesis about the probable cause of the incident and to decide on a fix.

<ul><li><h3 id="resolution">Incident Resolution</h3></li></ul>
The responder team applies the fix proposed in the previous step and, typically, observes the system for a little while to confirm that the incident has been resolved. Normally, it can take several iterations of trial and error before an incident is resolved. Each trial provides more information to evolve the hypothesis and formulate better fixes.

<div style="padding: 20px; background-color: #efefef">
<p><strong>Note: The OODA Loop</strong></p>
<figure style="max-width:500pxpx" class="w-richtext-align-fullwidth w-richtext-figure-type-image"><div><img src="https://uploads-ssl.webflow.com/5c9200c49b1194323aff7304/602cd0610681e891874d4666_image1.png" loading="lazy" alt=""></div><figcaption><a href="https://en.wikipedia.org/wiki/OODA_loop" target="_blank"><em>Image Source</em></a></figcaption></figure>
<p>The description of the phases of an incident gives the impression of a structured, systematic engineering process that is calmly applied by experts. However, reality is rarely so neat and clean. Incidents, particularly major ones, are more akin to a battle than an engineering process. Everyone is under pressure, failure has catastrophic consequences and there is always insufficient information to understand what is really happening.</p>
<p>It is appropriate, therefore, that the best way to respond to such situations was determined by the military: the <a href="https://en.wikipedia.org/wiki/OODA_loop" target="_blank">OODA loop</a>. Originally conceived to guide fighter pilots’ decision-making during dogfights, it has since been adopted by many industries as a framework for handling crisis situations.</p>
<p>The OODA loop requires the responder to: </p>
<ul role="list"><li><strong>Observe</strong>: gather available information about the situation </li><li><strong>Orient</strong>: relate that information to existing knowledge, experience, and skills </li><li><strong>Decide</strong>: make a hypothesis about the situation, that is, decide the probable cause </li><li><strong>Act</strong>: Apply the corrective measure suggested by the hypothesis </li><li><strong>Loop</strong>: Feedback results of the action to step one and repeat until resolution.</li></ul>
</div>

<ul><li><h3 id="closure" class="jumptarget">Incident Closure</h3></li></ul></div><p>The incident is marked closed when confirmation is received that normal services have resumed. The definition of confirmation varies but it is often wise to use multiple independent confirmations, for example:</p><ul role="list"><li>Monitoring systems </li><li>Development or Operations team </li><li>End users</li></ul><p>An important part of incident closure is deciding and logging follow-up actions. This usually requires a <a href="https://www.squadcast.com/blog/towards-more-effective-incident-postmortems">postmortem</a> that does an RCA and a process review of the incident. The process review will generate follow-up steps to improve the incident management process. The RCA will determine if</p><ul role="list"><li>a permanent fix is needed </li><li>if any other preventative maintenance is needed to avoid similar or related incidents </li><li>if any clean up or any artifacts created by the incident or troubleshooting is needed</li></ul><p>Incident lifecycle now gives a clear picture of various activities an incident management team is practically following while encountering an incident. Now let’s look into the best practices a team should have in order to make incident management a less stressful activity.</p><div class="w-embed"><h3 id="bestpractices" class="jumptarget">What are some of the best practices in incident management?</h3></div><p>ITIL incident lifecycle provides a way to handle an incident, but the best practice comes only with extensive practical experience towards managing an incident. This section is about keeping an incident management team productive with a structured format. These are some of the practices that would greatly encourage a team towards efficiency and avoid burnouts.</p><div class="w-embed"><h4 id="recursive" class="jumptarget">1. Recursive Delegation of Roles and Responsibilities</h4></div><p>The first step is to delegate the work involved among all team members. Handling incidents needs a lot of awareness about who has to do which work. Adequate information about each individual&#x27;s roles and responsibilities would help them in taking key decisions independently. Now the basic roles in handling an incident are,</p><ul role="list"><li><strong><em>Incident Commander</em></strong> - is the lead member who delegates work to taskforce </li><li><strong><em>Operational Work Team</em></strong> - Team members in this group are responsible  to execute all operational procedures that has to be done to resolve an incident as early as possible </li><li><strong><em>Communication Team </em></strong>- They help in communicating the status of an incident to other team members and stakeholders. Their main duty is to maintain and update an incident document with accurate information</li><li><strong><em>Planning Team</em></strong> - Executes planning of handoffs, monitoring capabilities of system infrastructure before and after an incident. Also, they deal with long-term issues like filing bugs and reverting the system to normal once an incident is resolved</li></ul><div class="w-embed"><ul style="margin-left: 20px;list-style: square;"><li><h3 id="command" class="jumptarget">How does Incident Command System Work?</h3></li></ul></div><p>The incident command system was <a href="https://sre.google/workbook/incident-response/" target="_blank">originally formulated in the year 1968</a> by a fire  disaster response team to delegate roles and responsibilities for every team member across a team. Later it was incorporated into managing incidents across software and cloud infrastructure systems.</p><p>The framework of incident response revolves around 3&#x27;C&#x27;s or the goals of effective incident management. They are,</p><ol start="" role="list"><li><strong><em>Coordination</em></strong> in incident response efforts </li><li><strong><em>Communication</em></strong> across an incident team, stakeholders and customers </li><li><strong><em>Controlling</em></strong> all efforts of incident response and management </li></ol><p>This is about delegation of roles among an incident management team.</p><div class="w-embed"><h4 id="centralised" class="jumptarget">2. Centralized and Well-Defined War Room for Incident Response Taskforce</h4></div><p>This stage is about setting up a designated war room, a centralized space where team members can coordinate with each other in resolving an incident at a faster pace. Here, the team can use Slack/Telephone/Video conferencing for maintaining and recording a communication log between team members about incident related traffic and alerts.</p><div class="w-embed"><h4 id="live" class="jumptarget">3. Maintaining a Live (Real-time) Incident State Document</h4></div><p>This stage is about the role of an incident commander to maintain a concurrent live incident document where all details of an incident are recorded diligently. This live document can be hosted on wiki and must be accessible to every other team member, enabling them to contribute data about an incident. This practice ensures transparency among team members and stakeholders.</p><div class="w-embed"><h4 id="handoff" class="jumptarget">4. Live Handoff across Incident Management Team</h4></div><p>This happens when the incident responders need to change in an ongoing incident. This could be because their shift has ended or even because they are exhausted. When the team changes whatever work they were each doing must be seamlessly handed over to the new team. This includes the overall status, the progress of investigation or corrective action, and more. A real-time incident state document is invaluable for this.</p><div class="w-embed"><h4 id="strategy" class="jumptarget">5. Incident Management Strategy and Best Practices</h4></div><p>Finally, this stage is about putting into practice all of the <a href="https://www.squadcast.com/blog/best-practices-in-incident-management">best incident management strategies</a> that helped in resolving an incident. This greatly ensures in reducing meantime to recovery and avoid any stressful situations to an incident management team. Some of them are,</p><ul role="list"><li>Prioritization of work</li><li>Preparation across a team </li><li>Allow Autonomy to each Role </li><li>Introspection </li><li>Make arrangements for alternatives </li><li>Practice and Change roles </li></ul><div class="w-embed"><h4 id="rca" class="jumptarget">6. Postmortems and RCAs</h4></div><p>After every non-trivial incident, it is important to run a postmortem. There are some important outcomes of a good postmortem:</p><ul role="list"><li><strong>Corrective or Preventive Actions</strong>: A permanent fix of the cause of the incident. Many incidents are resolved with temporary fixes without an assurance that the problem would not re-occur. To illustrate the difference between corrective and preventive action let us take the example of a bug triggered by high load. The corrective action would be to fix the bug. A preventive action would be to increase capacity to prevent the same load levels from being reached again. Normally both actions have to be taken. </li><li><strong>Lessons Learned</strong>: A technical learning that can be applied to an unrelated part of the system. A problem in the inventory module caused by an incorrectly configured load balancer, for example, could easily happen in the reporting system. </li><li><strong>Process Improvements</strong>: Process changes that could improve how all incidents are handled. For example, “All configuration changes must be logged in the incident log so that they are not forgotten” </li></ul><p>The outcomes are achieved by reviewing the incident and identifying its root cause.</p><div class="w-embed"><ul style="margin-left: 20px;list-style: square;"><li><h3 id="postmortem" class="jumptarget">Postmortem Best Practices</h3></li></ul>
<ul><li style="list-style: none;"><strong>Blameless postmortems</strong></li></ul></div><p>When postmortems are focussed on assigning responsibility (i.e, blame) then most participants will be primarily concerned with not being blamed. Conversely, a focus on what went wrong will allow the participants to be more objective and less worried about protecting themselves. It also recognizes that humans make mistakes and that it is more effective to address circumstances that contribute to errors than to seek humans who don’t make mistakes.</p><div class="w-embed"><ul><li style="list-style: none;"><strong>Track and Reward Outcomes</strong></li></ul></div><p>There is no value in postmortems if they do not generate results. Track and reward postmortem outcomes: </p><ul role="list"><li>closed action items </li><li>improved reliability </li><li>process changes </li><li>postmortem ownership </li></ul><p>Postmortems without outcomes or action items are usually a sign that they’re ineffective.</p><div class="w-embed"><ul><li style="list-style: none;"><strong>Encourage Transparency</strong></li></ul></div><p>The lessons from a postmortem are wasted if they are not applied to all systems and teams organization-wide. Sharing and transparency help ensure that lessons learned to percolate throughout the organization. Some steps to encourage transparency: </p><ul role="list"><li>Notifications of new postmortems should be organization-wide </li><li>Conduct cross-team reviews of postmortems </li><li>Regular incident and postmortem reports</li></ul><div class="w-embed"><ul><li style="list-style: none;"><strong>Address Postmortem Culture Failures</strong></li></ul></div><p>Signs of a failing postmortem culture must be immediately addressed. Culture is not a set of principles in a document but behavior that is rewarded or penalized. Some failings are: </p><ul role="list"><li>Assigning “responsibility” (that is, blame) during postmortems. </li><li>Insufficient time for postmortems. </li><li>Repeating incidents </li><li>Unresolved postmortem action items </li></ul><p>Additional reading: <a href="https://www.squadcast.com/blog/towards-more-effective-incident-postmortems">Towards More Effective Incident Postmortems</a></p><div class="w-embed"><h3 id="conclusion" class="jumptarget">Conclusion</h3></div><p>Incidents are common events that should be handled in a standard pattern. ITIL defines a good template to follow.  A few good practices can really help improve the effectiveness of an incident management process:</p><ul role="list"><li>Team should maintain a clear and well-structured “line of command”</li><li>Team should delegate roles and responsibilities of every team member to resolve incidents as quickly as possible</li><li>Record every action on debugging and mitigation while resolving incidents</li><li>Always declare active incidents as early as possible across an SRE/DevOps team and delegate corresponding roles across team members to collaborate effectively</li><li>Set up an appropriate framework for defining <a href="https://www.squadcast.com/blog/better-incident-response-incident-classification-setting-severities-with-tags">incident response process</a> and procedures to scale up team’s performance</li><li>Team should have the best practice in incident response handy to avoid any deviations from it</li><li>Postmortems and RCAs help organizations learn from incidents and prevent them from reoccurring.</li></ul><p>We hope this blog gives you a better and deeper understanding of the best practices to follow during the lifecycle of an incident, enabling you handle critical incidents in your organization without much hassle and burnouts.</p><p><a href="https://www.squadcast.com/" target="_blank"><em>Squadcast</em></a><em> is an incident management tool that’s purpose-built for SRE. Your team can get rid of unwanted alerts, receive relevant notifications, work in collaboration using the virtual incident war rooms, and use automated tools like runbooks to eliminate toil.</em></p><div class="w-embed"><a href="https://app.squadcast.com/register/"><img alt="squadcast" src="https://uploads-ssl.webflow.com/5c51758c58939b30a6fd3d73/5e16013f80ad26b00925d758_image--5--1.png" style="width: 850px;"></a></div></div>