Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Real-World SRE
Real-World SRE

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

eBook
$9.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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

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 : 9781788626446
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 $ 136.97
Cloud Native Architectures
$48.99
Practical Site Reliability Engineering
$43.99
Real-World SRE
$43.99
Total $ 136.97 Stars icon
Banner background image

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

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.