resiliency testing with toxiproxy · a flash sale takes down redis while a deploy is going out....
TRANSCRIPT
![Page 1: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/1.jpg)
October 29–November 3, 2017 | San Francisco, CAwww.usenix.org/lisa17 #lisa17
Resiliency Testing with Toxiproxy
Jake Pittis
![Page 2: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/2.jpg)
Resiliency Testing with Toxiproxy
Jake Pittis
![Page 3: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/3.jpg)
![Page 4: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/4.jpg)
![Page 5: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/5.jpg)
![Page 6: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/6.jpg)
Reasoning about failure is hard.
![Page 7: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/7.jpg)
Too many kinds of failures.
![Page 8: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/8.jpg)
Large complex systems.
![Page 9: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/9.jpg)
Constantly changing.
![Page 10: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/10.jpg)
Our intuition is often wrong.
![Page 11: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/11.jpg)
IncidentA natural failure in production.
![Page 12: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/12.jpg)
A database writer goes down.
![Page 13: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/13.jpg)
Incident
Root cause?
Ship fix!
![Page 14: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/14.jpg)
More Resilient
Incident
Root cause?
Ship fix!
![Page 15: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/15.jpg)
GamedayArtificially exercising a known failure scenario in production.
![Page 16: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/16.jpg)
Flash sales.
![Page 17: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/17.jpg)
Gameday
What broke?
Ship fix!
![Page 18: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/18.jpg)
Gameday
What broke?
Ship fix!
Root cause?
Ship fix!
Incident
![Page 19: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/19.jpg)
![Page 20: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/20.jpg)
![Page 21: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/21.jpg)
![Page 22: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/22.jpg)
![Page 23: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/23.jpg)
Resiliency is a product concern.
![Page 24: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/24.jpg)
Automatically Prevent Regression
![Page 25: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/25.jpg)
Accessible to All Developers
Automatically Prevent Regression
![Page 26: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/26.jpg)
Lower Customer Impact
Accessible to All Developers
Automatically Prevent Regression
![Page 27: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/27.jpg)
Maintain Authenticity
Lower Customer Impact
Accessible to All Developers
Automatically Prevent Regression
![Page 28: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/28.jpg)
![Page 29: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/29.jpg)
Chaos EngineeringRunning experiments in production to cause and fix unknown
failure scenarios.
![Page 30: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/30.jpg)
“Automate Experiments to Run Continuously”
Automatically Prevent Regression
![Page 31: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/31.jpg)
“Minimize Blast Radius”
Lower Customer Impact
![Page 32: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/32.jpg)
“Run Experiments in Production”
Maintain Authenticity
![Page 33: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/33.jpg)
Toxiproxy
![Page 34: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/34.jpg)
Development and Test Environment
Inject failures via HTTP API.
![Page 35: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/35.jpg)
Development and Test Environment
Latency of 200 ms.
![Page 36: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/36.jpg)
Development and Test Environment
Blackhole data.
![Page 37: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/37.jpg)
Development and Test Environment
Reject connections.
![Page 38: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/38.jpg)
Reactive Testing
![Page 39: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/39.jpg)
Incident
Root cause?
Ship fix!
![Page 40: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/40.jpg)
Incident
Root cause?
Ship fix!
Does it work?
Regression?
![Page 41: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/41.jpg)
A flash sale takes down redis while a deploy is going out.
![Page 42: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/42.jpg)
A flash sale takes down redis while a deploy is going out.
Application boot relies on redis!?
![Page 43: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/43.jpg)
A flash sale takes down redis while a deploy is going out.
Remove the dependency!
Application boot relies on redis!?
![Page 44: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/44.jpg)
A flash sale takes down redis while a deploy is going out.
Remove the dependency!
Application boot relies on redis!?
Write a Toxiproxy test!
![Page 45: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/45.jpg)
![Page 46: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/46.jpg)
Accessible to All Developers ✅
![Page 47: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/47.jpg)
No Customer Impact ✅
Accessible to All Developers ✅
![Page 48: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/48.jpg)
Maintain Authenticity ✅
No Customer Impact ✅
Accessible to All Developers ✅
![Page 49: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/49.jpg)
Automatically Prevent Regression ✅
Maintain Authenticity ✅
No Customer Impact ✅
Accessible to All Developers ✅
![Page 50: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/50.jpg)
A few hundred Toxiproxy Tests
![Page 51: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/51.jpg)
All you need is a thin client library.
Java, Node, Python, PHP or write your own!
![Page 52: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/52.jpg)
I used it reactively just last week.
![Page 53: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/53.jpg)
Proactive Testing
![Page 54: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/54.jpg)
Resiliency MatrixSections
Services
![Page 55: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/55.jpg)
Resiliency MatrixSections
Services
![Page 56: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/56.jpg)
Resiliency MatrixSections
Services
![Page 57: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/57.jpg)
![Page 58: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/58.jpg)
Gameday
What broke?Root cause?
Ship fix and Toxiproxy test!
Incident
Ship fix and Toxiproxy test!
Create Resiliency Matrix
Test every intersection.
![Page 59: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/59.jpg)
What’s next?
![Page 60: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/60.jpg)
All our applications should have a resiliency matrices.
![Page 61: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/61.jpg)
Integrate Toxiproxy into all our applications by default.
![Page 62: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/62.jpg)
Gameday everything we can’t write Toxiproxy tests for.
![Page 63: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/63.jpg)
Automate the gamedays.
![Page 64: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/64.jpg)
Gamedays
![Page 65: Resiliency Testing with Toxiproxy · A flash sale takes down redis while a deploy is going out. Remove the dependency! Application boot relies on redis!? A flash sale takes down](https://reader034.vdocuments.mx/reader034/viewer/2022051921/600e8bd361f65c79c055154b/html5/thumbnails/65.jpg)
Toxiproxy is open source.(github.com/Shopify/toxiproxy)
Go read the readme for more information!
Thanks!