Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Real-World SRE
Real-World SRE

Real-World SRE: The Survival Guide for Responding to a System Outage and Maximizing Uptime

eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Real-World SRE

Instrumenting an application


First, a caveat—there are a lot of programming languages and monitoring systems. We will be talking about various monitoring systems later in the chapter, and there are libraries for all sorts of languages and systems. So, just because I am providing examples here with specific languages and libraries, it does not mean that you cannot do something very similar with your language and monitoring system of choice.

For the first example, we will use Ruby and StatsD. Ruby is a popular scripting language and tends to be what I use when I want to build something quickly. Also, some very large websites use Ruby, including GitHub, Spotify, and Hulu. StatsD is a monitoring system from Etsy. It is open source and used by many companies including Kickstarter and Hillary for America.

I have commented on this simple application as much as possible. However, if you need more documentation than my comments, see the references section.

Sinatra is a simple web framework. It creates...

Collecting and saving monitoring data


Once you have instrumented your application, you will need to store your data somewhere. As I mentioned in the Instrumenting an application section of this chapter, there are many possible tools you can use. I will be talking about some of the tools, but be aware that there are many others. Talk to your friends, do research online, and try different tools to figure out what is best for you, your team, and your organization.

I tend to organize monitoring tools into two buckets. This is often a simplification of these systems, but it helps me to think about how they work. These two buckets are polling applications and push applications.

Polling applications

Polling (also known as pull) applications scrape data from a service and then store and display the data. Some of the complaints against polling applications are that you need to keep some record of all of your services to scrape. There's nothing wrong with polling applications, but this is just something...

Displaying monitoring information


Now that you are collecting your data and writing it into storage, you can start to display it to users. Many of the previously mentioned monitoring tools provide their own visualization systems. Others recommend that you bring your own. One popular open-source tool for this is Grafana.

Whatever you use to visualize and access your metrics, there are four categories of tools that people often use to get and share their data:

  • Arbitrary queries

  • Graphs

  • Dashboards

  • Chatbots

Let us talk about why each is useful and things to keep in mind for each of these features.

Arbitrary queries

Everyone needs the ability to create a query of the metrics and logs you are building. The reason is pretty straightforward—metrics are useless if people cannot access them. While you can build people graphs and dashboards, while people are working, they will often have new and exciting questions, which they will need to write new queries against the metric datastore to get answers to. You...

Managing and maintaining monitoring data


OK, now you have the basics of a monitoring system all set up. You have data flowing from your service to a datastore. You can visualize how things change over time. As you accumulate data over time, you are going to have to maintain that service. There are a few tricks for dealing with that.

The first way is a classic, tried, and true method—pay someone else to do it. There are tons of companies that sell hosted monitoring software. Datadog, Honeycomb, GrafanaCloud, InfluxCloud, Librato, Instrumental, New Relic, and many others, sell products with all sorts of features and tools where you do not have to host your monitoring tools.

Sometimes though, you do not have that kind of money, you have special security requirements, you cannot deal with the restrictions that hosted services impose, or you have some other reason not to relegate your monitoring infrastructure to someone else. In that case, first and foremost, you should monitor your monitoring...

Communicating about monitoring


We have talked a bit about communicating about monitoring to others throughout the chapter, but let's focus in on it for a minute. Firstly, if you have spent all this effort spinning up a monitoring system, make sure other people can access it. If you are going to go about spreading the gospel of your new monitoring system, make sure to test it. Otherwise, when you get them interested with all of your well-crafted emails, and poking and prodding, they will give up immediately if they cannot access it.

Do they even know there is monitoring?

They can be your boss, your product team, your engineering team, your friend who runs her website on the Raspberry Pi cluster sitting in the closet of your sister's house with a fiber connection, or anyone else you think should care about your service. The first thing to do is tell them about the new monitoring system. A well-written email with example graphs, links to documentation, and your favorite dashboards goes a long...

References and related reading


Related to the code in this chapter, the following are links to documentation for frameworks, programming languages, and other code.

  1. Sinatra is a web framework for Ruby and has excellent online documentation at http://sinatrarb.com/

  2. The StatsD Ruby library documentation is at http://www.rubydoc.info/github/reinh/statsd/Statsd

  3. I am using Ruby 2.5.0, whose documentation is at https://ruby-doc.org/core–2.5.0/

  4. An overview of StatsD—https://github.com/etsy/statsd/

  5. The Prometheus Go client documentation—https://godoc.org/github.com/prometheus/client_golang/prometheus

  6. The Go language documentation—https://golang.org/doc/

  7. An overview of Prometheus—https://prometheus.io/

  8. Oxford Dictionaries (https://en.oxforddictionaries. com/definition/monitor)

Future reading

No book should ever be the sum of all knowledge. It is impossible. As I mentioned earlier, there are many monitoring philosophies, and while the following books and websites touch on some of them, neither my...

Summary


Now that the metrics and logs are flowing, and people love this new system you set up, it is time to start using it for what it was meant for—waking people up at three in the morning because of an emergency.

In this chapter, we learned about a variety of tools that you can use for monitoring, plus why monitoring is useful and important.

In the next chapter, we will be talking about alerting team members about outages and how to run incident response in such a way that people will not be afraid of responding to an incident. Let's make sure that everyone will be laughing and hugging, instead of running for the doors!

References and related reading

Related to the code in this chapter, the following are links to documentation for frameworks, programming languages, and other code.

  1. Sinatra is a web framework for Ruby and has excellent online documentation at http://sinatrarb.com/
  2. The StatsD Ruby library documentation is at http://www.rubydoc.info/github/reinh/statsd/Statsd
  3. I am using Ruby 2.5.0, whose documentation is at https://ruby-doc.org/core–2.5.0/
  4. An overview of StatsD—https://github.com/etsy/statsd/
  5. The Prometheus Go client documentation—https://godoc.org/github.com/prometheus/client_golang/prometheus
  6. The Go language documentation—https://golang.org/doc/
  7. An overview of Prometheus—https://prometheus.io/
  8. Oxford Dictionaries (https://en.oxforddictionaries.com/definition/monitor)

Future reading

No book should ever be the sum of all knowledge. It is impossible. As I mentioned earlier, there are many monitoring philosophies, and while the following books and websites touch on...

Summary

Now that the metrics and logs are flowing, and people love this new system you set up, it is time to start using it for what it was meant for—waking people up at three in the morning because of an emergency.

In this chapter, we learned about a variety of tools that you can use for monitoring, plus why monitoring is useful and important.

In the next chapter, we will be talking about alerting team members about outages and how to run incident response in such a way that people will not be afraid of responding to an incident. Let's make sure that everyone will be laughing and hugging, instead of running for the doors!

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Proven methods for keeping your website running
  • A survival guide for incident response
  • Written by an ex-Google SRE expert

Description

Real-World SRE is the go-to survival guide for the software developer in the middle of catastrophic website failure. Site Reliability Engineering (SRE) has emerged on the frontline as businesses strive to maximize uptime. This book is a step-by-step framework to follow when your website is down and the countdown is on to fix it. Nat Welch has battle-hardened experience in reliability engineering at some of the biggest outage-sensitive companies on the internet. Arm yourself with his tried-and-tested methods for monitoring modern web services, setting up alerts, and evaluating your incident response. Real-World SRE goes beyond just reacting to disaster—uncover the tools and strategies needed to safely test and release software, plan for long-term growth, and foresee future bottlenecks. Real-World SRE gives you the capability to set up your own robust plan of action to see you through a company-wide website crisis. The final chapter of Real-World SRE is dedicated to acing SRE interviews, either in getting a first job or a valued promotion.

Who is this book for?

Real-World SRE is aimed at software developers facing a website crisis, or who want to improve the reliability of their company's software. Newcomers to Site Reliability Engineering looking to succeed at interview will also find this invaluable.

What you will learn

  • Monitor for approaching catastrophic failure
  • Alert your team to an outage emergency
  • Dissect your incident response strategies
  • Test automation tools and build your own software
  • Predict bottlenecks and fight for user experience
  • Eliminate the competition in an SRE interview
Estimated delivery fee Deliver to Slovenia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 31, 2018
Length: 340 pages
Edition : 1st
Language : English
ISBN-13 : 9781788628884
Languages :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to Slovenia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Aug 31, 2018
Length: 340 pages
Edition : 1st
Language : English
ISBN-13 : 9781788628884
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 102.97
Real-World SRE
€32.99
Practical Site Reliability Engineering
€32.99
Cloud Native Architectures
€36.99
Total 102.97 Stars icon

Table of Contents

12 Chapters
1. Introduction Chevron down icon Chevron up icon
2. Monitoring Chevron down icon Chevron up icon
3. Incident Response Chevron down icon Chevron up icon
4. Postmortems Chevron down icon Chevron up icon
5. Testing and Releasing Chevron down icon Chevron up icon
6. Capacity Planning Chevron down icon Chevron up icon
7. Building Tools Chevron down icon Chevron up icon
8. User Experience Chevron down icon Chevron up icon
9. Networking Foundations Chevron down icon Chevron up icon
10. Linux and Cloud Foundations Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(10 Ratings)
5 star 80%
4 star 0%
3 star 10%
2 star 10%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




andrew drozdov Oct 11, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
An easy to follow playbook with some insightful gems. Nat's book should be required reading for devops engineers and benefits anyone that is building or maintaining software. If you want to learn a lot about the headaches of building software and how to handle them (simulating years of experience), then this book is for you.
Amazon Verified review Amazon
Christos Perivolaropoulos Sep 10, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
a great book that covers with details the ground from beginner to competent SRE. This is not only useful for SREs but anyone either working closely with SREs. My favorite chapter would be chapter 2 (monitoring) which goes over the more recent jargon and tools that SREs use that you will not find in a UNIX programming book.I also enjoyed chapter 9 about networking fundamentals. It explains in detail the way the internet works, but not enough detail to overwhelm the reader. Throughout the book, but especially on this chapter, the writer manages to keep the theoretical aspects grounded on practice by providing ways for the reader to test their knowledge with simple tools and techniques.I would recommend this book without hesitation.
Amazon Verified review Amazon
Customer Oct 11, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book really succeeds in covering the baselines of what you need to know for applying SRE to your organization, at a reasonable level. That is, Welch explicitly mentions multiple times in the book about scaling efforts to what makes sense for your company -- because in tech publishing, it's easy to act like everyone is Google, but we aren't. I learned something in every chapter, and I really appreciate the inclusion of UX and the "bonus" (to me) chapters on linux fundamentals. A great book for someone who needs to do SRE but doesn't come from an ops background.
Amazon Verified review Amazon
Aaron Sep 19, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Most of the technical books I’ve read tend to fall into one of two categories. The first is a overview of the technical details that covers everything you’d like to know but is really dry. The other is a glorified autobiography of the author’s experience providing little technical information that can be found beyond a Wikipedia page. This book defies the odds and succeeds at providing a great level of technical detail while being an inherently easy to read. I certainly did not intend to finish half of it in one sitting, ignoring everything else I needed to do, but I did.What I like most about the book is that each major element of SRE isn’t just thrown out there as a fact. Nat introduces each topic follows it up with an explanation as to why each element is important and provides a story that shows why each major element is important. This style of writing is not only easily to read but it helps me retain It as well as having a concrete use case.Full disclosure: I’ve known Nat since high school so I received a review copy for free. But since we had no issues making fun of each other back in school I’d certainly have no problem calling him out if this book was bad.
Amazon Verified review Amazon
Alicja Raszkowska Oct 17, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book sets up a framework for SRE supported by real-life examples and experiences. It focuses not only on the positive side, but also emphasizes continuous improvement of SRE tools and processes, as well as engineer skills and happiness. It's full of examples and use cases that present the perspective of companies of all sizes and priorities. I thought I was a complete SRE newbie when I started reading it and I was surprised how many of the outlined strategies followed best practices and common sense I was already familiar with.I especially liked Nat's focus on communication - positive, encouraging, teamwork-driven culture that automates the boring parts of the job and gives space for growing in other areas. Building tools and thinking about user experience, especially for users we might never meet or get feedback from, shows the long-term focus on delivering quality products. Nat never shies away from sharing lessons learned from past experiences.I think this book is a good introduction to SRE both on a detail-oriented level of building a system of alerts, metrics and schedules, as well as understanding the bigger picture and impact it can have on the whole team and company. There are certain parts of it I wouldn't expect to show up in such a technical read, e.g. examples of how to have a growth-mindset as an SRE expert.I throughly enjoyed this book - the only caveat I experienced was that the code samples don't have syntax highlighting, so it was hard to parse them in longer snippets.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela