Praise for Learning Chaos Engineering
Russ Miles explains the theory and practice of chaos engineering in an easy-to-follow tutorial using the Chaos Toolkit. This is a great resource for anyone looking
to get started with chaos engineering.
Aaron Blohowiak, Engineering Manager at Netflix and coauthor of OReillys Chaos Engineering report
Exploring systemic weakness in distributed systems is a critical practice for any organization running a cloud-native, microservices-style architecture. This book is a comprehensive and practical guide helping you successfully socialize, implement, and adopt chaos engineering practices. I highly recommend it.
Christian Posta, Field CTO, Solo.io
For anyone who runs production systems, this is a great practical primer on how to get started with using chaos engineering in service of greater confidence in the increasingly complex systems were building today. Youll learn all the processes and tools youll need to hit the ground running, even if youve never participated in a Game Day before.
Denise Yu, Senior Software Engineer, Pivotal
Learning Chaos Engineering
by Russ Miles
Copyright 2019 Russ Miles. All rights reserved.
Printed in the United States of America.
Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
- Development Editor: Virginia Wilson
- Acquisitions Editor: Nikki McDonald
- Production Editor: Katherine Tozer
- Copyeditor: Arthur Johnson
- Proofreader: Rachel Head
- Indexer: Ellen Troutman
- Interior Designer: David Futato
- Cover Designer: Karen Montgomery
- Illustrator: Rebecca Demarest
- August 2019: First Edition
Revision History for the First Edition
- 2019-07-12: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781492051008 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. Learning Chaos Engineering, the cover image, and related trade dress are trademarks of OReilly Media, Inc.
The views expressed in this work are those of the author and do not represent the publishers views. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
978-1-492-05100-8
[LSI]
Dedication
For my daughter Mali Miles, my own little Chaos Monkey
Preface
This is a book for practitioners of the scientific discipline of chaos engineering. Chaos engineering is part of the overall resilience engineering approach and serves the specific purpose of surfacing evidence of system weaknesses before those weaknesses result in crises such as system outages. If you care about how you, your colleagues, and your entire sociotechnical system collectively practice and respond to threats to your systems reliability, chaos engineering is for you!
Audience
This book is for people who are in some way responsible for their code inproduction. That could mean developers, operations, DevOps, etc. When I say they are in some way responsible, I mean that they take responsibility for theavailability, stability, and overall robustness of their system as it runs, and mayeven be part of the group assembled when there is a system outage.
Perhaps youre a site reliability engineer (SRE) looking to improve the stability of the systems you are responsible for, or youre working on a team practicing DevOps where everyone owns their code in production. Whatever your level of responsibility, if you care about how your code runs in production and about the bigger picture of how well production is running for your organization, this book aims to help you meet those challenges.
What This Book Is About
This is a practical guide to doing chaos engineering using free and open source tools, in particular the Chaos Toolkit (see ).
Chaos engineering follows the scientific method, so youll learn in ).
Through this learning path, Learning Chaos Engineering aims to give you and your colleagues all you need to begin adopting chaos engineering safely and carefully across your organization right now.
What This Book Is Not About
This book doesnt aim to be the definitive treatment on all the theoretical aspects of chaos engineering, although by Ali Basiri et al. [OReilly]), or even make a guess at the futures of chaos engineering. With minimal fuss, this book tries to cut the fluff and get you practicing chaos engineering successfully as quickly as possible.
About the Samples
All of the chaos experiment automation samples in this book use the free and open source Chaos Toolkit. The Chaos Toolkit is a command-line interface (CLI) and set of extension libraries that enables you to write automated chaos experiments and orchestrate them against your systems.
As part of this books work, the community has also developed the Chaos Toolkit Community Playground project. This project aims to provide a collection of full-application samples that the community can collaborate around to share experiments, evidence of weaknesses, and even system design improvements out in the open, where everyone can learn from them (see ).
Conventions Used in This Book
The following typographical conventions are used in this book:
ItalicIndicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This element signifies a tip or suggestion.
Note
This element signifies a general note.
Warning
This element indicates a warning or caution.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is available for download at https://github.com/chaostoolkit-incubator/community-playground.
This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.