Mart n Ferrari: Tales from the SRE trenches: What can SRE do for you?
This is the fourth part in a series of articles about SRE, based on the talk I gave in the Romanian Association for Better Software.
Previous articles can be found here: part 1, part 2, and part 3.
As a side note, I am writing this from Heathrow Airport, about to board my plane to EZE. Buenos Aires, here I come!
So, what does SRE actually do?
Enough about how to keep the holy wars under control and how to get work away
from Ops. Let's talk about some of the things that SRE does.
Obviously, SRE runs your service, performing all the traditional SysAdmin
duties needed for your cat pictures to reach their consumers: provisioning,
configuration, resource allocation, etc.
They use specialised tools to monitor the service, and get alerted as soon as a
problem is detected. They are also the ones waking up to fix your bugs in the
middle of the night.
But that is not the whole story: reliability is not only impacted by new
launches. Suddenly usage grows, hardware fails, networks lose packets, solar
flares flip your bits... When working at scale, things are going to break more
often than not.
You want these breakages to affect your availability as little as possible,
there are three strategies you can apply to this end: minimise the impact of
each failure, recover quickly, and avoid repetition.
And of course, the best strategy of them all: preventing outages from happening
at all.
Minimizing the impact of failures
A single failure that takes the whole service down will affect severely your
availability, so the first strategy as an SRE is to make sure your service is
fragmented and distributed across what is called "failure domains". If the
data center catches fire, you are going to have a bad day, but it is a lot
better if only a fraction of your users depend on that one data center, while
the others keep happily browsing cat pictures.
SREs spend a lot of their time planning and deploying systems that span the
globe to maximise redundancy while keeping latencies at reasonable levels.
Recovering quickly
Many times, retrying after a failure is actually the best option. So
another strategy is to automatically restart in milliseconds any piece of your
system that fails. This way, less users are affected, while a human has time to
investigate and fix the real problem.
If a human needs to intervene, it is crucial that they get notified as fast as
possible, and that they have quick access to all the information that is needed
to solve the problem: detailed documentation of the production environment,
meaningful and extensive monitoring, play-books1, etc. After all, at 2 AM you
probably don't remember in which country the database shard lives, or what were
the series of commands to redirect all the traffic to a different location.
Implementing monitoring and automated alerts, writing documentation and
play-books, and practising for disaster are other areas where SREs devote much
effort.
Avoiding repetition
Outages happen, pages ring, problems get fixed, but it should always be a
chance for learning and improving. A page should require a human to think about
a problem and find a solution. If the same problem keeps appearing, the human
is not needed any more: the problem needs to be fixed at the root.
Another key aspect of dealing with incidents is to write post-mortems2. Every
incident should have one, and these should be tools for learning, not
finger-pointing. Post-mortems can be an excellent tool, if people are honest
about their mistakes, they are not used to blame other people, and issues are
followed up by bug reports and discussions.
Preventing outages
Of course nobody can prevent hard drives from failing, but there are certain
classes of outages that can be forecasted with careful analysis.
Usage spikes can bring a service down, but an SRE team will ensure that the
systems are load-tested at higher-than-normal rates. They could also be
prepared to quickly scale the service, provided the monitoring system will
alert as soon as a certain threshold is reached.
Monitoring is actually the key part in this: measuring relevant metrics for all
the components of a system, and following their trends over time, SREs can
completely avoid many outages: latencies growing out of acceptable bounds,
disks filling up, progressive degradation of components, are all examples of
typical problems automatically monitored (and alerted on) in an SRE team.
This is getting pretty long, so the next post will be the last one of these series, with some extra tips from SRE experience that I am sure can be applied in many places.
- A play-book is a document containing critical information needed when dealing with a specific alert: possible causes, hints for troubleshooting, links to more documentation. Some monitoring systems will automatically add a play-book URL to every alert sent, and you should be doing it too.
- Similarly to their real-life counterparts, a post-mortem is the process of examining a dead body (the outage), gutting it out and trying to understand what caused its demise.
Comment
Recovering quickly
Many times, retrying after a failure is actually the best option. So
another strategy is to automatically restart in milliseconds any piece of your
system that fails. This way, less users are affected, while a human has time to
investigate and fix the real problem.
If a human needs to intervene, it is crucial that they get notified as fast as
possible, and that they have quick access to all the information that is needed
to solve the problem: detailed documentation of the production environment,
meaningful and extensive monitoring, play-books1, etc. After all, at 2 AM you
probably don't remember in which country the database shard lives, or what were
the series of commands to redirect all the traffic to a different location.
Implementing monitoring and automated alerts, writing documentation and
play-books, and practising for disaster are other areas where SREs devote much
effort.
Avoiding repetition
Outages happen, pages ring, problems get fixed, but it should always be a
chance for learning and improving. A page should require a human to think about
a problem and find a solution. If the same problem keeps appearing, the human
is not needed any more: the problem needs to be fixed at the root.
Another key aspect of dealing with incidents is to write post-mortems2. Every
incident should have one, and these should be tools for learning, not
finger-pointing. Post-mortems can be an excellent tool, if people are honest
about their mistakes, they are not used to blame other people, and issues are
followed up by bug reports and discussions.
Preventing outages
Of course nobody can prevent hard drives from failing, but there are certain
classes of outages that can be forecasted with careful analysis.
Usage spikes can bring a service down, but an SRE team will ensure that the
systems are load-tested at higher-than-normal rates. They could also be
prepared to quickly scale the service, provided the monitoring system will
alert as soon as a certain threshold is reached.
Monitoring is actually the key part in this: measuring relevant metrics for all
the components of a system, and following their trends over time, SREs can
completely avoid many outages: latencies growing out of acceptable bounds,
disks filling up, progressive degradation of components, are all examples of
typical problems automatically monitored (and alerted on) in an SRE team.
This is getting pretty long, so the next post will be the last one of these series, with some extra tips from SRE experience that I am sure can be applied in many places.
- A play-book is a document containing critical information needed when dealing with a specific alert: possible causes, hints for troubleshooting, links to more documentation. Some monitoring systems will automatically add a play-book URL to every alert sent, and you should be doing it too.
- Similarly to their real-life counterparts, a post-mortem is the process of examining a dead body (the outage), gutting it out and trying to understand what caused its demise.
Comment
Preventing outages
Of course nobody can prevent hard drives from failing, but there are certain
classes of outages that can be forecasted with careful analysis.
Usage spikes can bring a service down, but an SRE team will ensure that the
systems are load-tested at higher-than-normal rates. They could also be
prepared to quickly scale the service, provided the monitoring system will
alert as soon as a certain threshold is reached.
Monitoring is actually the key part in this: measuring relevant metrics for all
the components of a system, and following their trends over time, SREs can
completely avoid many outages: latencies growing out of acceptable bounds,
disks filling up, progressive degradation of components, are all examples of
typical problems automatically monitored (and alerted on) in an SRE team.
This is getting pretty long, so the next post will be the last one of these series, with some extra tips from SRE experience that I am sure can be applied in many places.
- A play-book is a document containing critical information needed when dealing with a specific alert: possible causes, hints for troubleshooting, links to more documentation. Some monitoring systems will automatically add a play-book URL to every alert sent, and you should be doing it too.
- Similarly to their real-life counterparts, a post-mortem is the process of examining a dead body (the outage), gutting it out and trying to understand what caused its demise.
Comment
- A play-book is a document containing critical information needed when dealing with a specific alert: possible causes, hints for troubleshooting, links to more documentation. Some monitoring systems will automatically add a play-book URL to every alert sent, and you should be doing it too.
- Similarly to their real-life counterparts, a post-mortem is the process of examining a dead body (the outage), gutting it out and trying to understand what caused its demise.
Thanks to Mehdi Dogguy, here's a nice hook to generate a source
change file at build time (with pbuilder), so one can upload
source-only packages to the archive and have buildds rebuild for
all the architectures. Put it in .pbuilder/hooks/B10_source-build
so it gets called once the builds succeeds

My monthly report covers a large part of what I have been doing in the free software world. I write it for 
"Graz nightlife as seen from the perspective of a blind couple" has just
been uploaded to
TLDR: mister-muffin.de (and all its subdomains), bootstrap.debian.net and
binarycontrol.debian.net are now finally signed by "Let's Encrypt Authority X1"
\o/
I just tried out the letsencrypt client Debian packages prepared by Harlan
Lieberman-Berg which can be found here:
Finally,
Sometimes one feels down and troubled, and instead of a helping hand, watching videos that cheer you up can get you a long way. Two of my favorite videos are one of the crazy Korean drummer Kwon Soon Keun (
On Thursday, October 22, 2015, Ubuntu 15.10 (Wily Werewolf) was released. To celebrate, some San Francisco members of the Ubuntu California LoCo Team held a small release party. Yelp was gracious enough to host the event and provide us with food and drinks. Canonical also sent us a box of swag for the event. Unfortunately, it did not arrive in time. Luckily, James Ouyang had some extra goodies from a previous event for us to hand out. Despite having a rather small turnout for the event, it was still a fun night. Several people borrowed the USB flash drives I had setup with Ubuntu, Kubuntu, and Xubuntu 15.10 in order to install Ubuntu on their machines. Other people were happy to play around with the new release in a virtual machine on my computer. Overall, it was a good night. Hopefully, we can put together an even better and larger release party for Ubuntu 16.04 LTS.
FOSDEM is one of the largest gatherings of Free Software contributors in the world and happens each February in Brussels (Belgium, Europe). One of the tracks will be the Desktops DevRoom (formerly known as CrossDesktop DevRoom ), which will host Desktop-related talks.
We are now inviting proposals for talks about Free/Libre/Open-source Software on the topics of Desktop development, Desktop applications and interoperability amongst Desktop Environments. This is a unique opportunity to show novel ideas and developments to a wide technical audience.
Topics accepted include, but are not limited to:
What happened in the