THINK YOUR SOFTWARE IS FAULT TOLERANT? PROVE ITCHRISTOPHER BATEY @CHBATEY
FEATURES WITHOUT AUTOMATED TESTS ARE MERELY RUMOURS
YOU DON’T KNOW A SERVICE IS FAULT TOLERANT IF YOU DON’T TEST FAULTS
PROTOCOL LEVEL TEST DOUBLE
YOUR SERVICEPROTOCOL
LEVEL TEST
DOUBLE
TEST
PRIMING
Real HTTP/TCP
Examples
REST Driver
Wiremock
MOCO
Stubbed Cassandra
DETERMINISTICALLY CREATE ANY SCENARIO
TO SURVIVE THE CHAOS MONKEY
TO SURVIVE REALITY
Pesky User (that’s us)
using cURL
Enterprise hello world
A different team’s software (probably
rubbish)
Crazy distributed database
HTTP /name
TCP surname
Dependency VM
Wiremock Stubbed Cassandra
192.168.2.2
Wiremock
192.168.2.2
Enterprise hello world
localhost 192.168.2.1
PRIMING
HITTING THE SERVICE
Wiremock
192.168.2.2
Enterprise hello world
localhost 192.168.2.1
Delay is here
Wiremock
192.168.2.2
Enterprise hello world
localhost 192.168.2.1
Delay is here
Wiremock
192.168.2.2
Enterprise hello world
localhost 192.168.2.1
Delay is here
Wiremock
192.168.2.2
Enterprise hello world
localhost 192.168.2.1
Delay is here
NOT JUST FOR HTTP
PRODUCTION?
Application
Issues here
PRODUCTION?ApplicationApplicationApplicationApplicationApplication
ApplicationApplicationApplicationApplicationApplication
ApplicationApplicationApplicationApplicationApplication
DC1
DC2
Distributed failuressuccessread_request_timeoutunavailablewrite_request_timeoutserver_errorprotocol_errorbad_credentialsoverloadedis_bootstrappingtruncate_error
READ TIMEOUT
Application C
R1
R2
R3C=QUROUM
Replication factor: 3
timeout
timeout
Read timeout
ResourcesWiremock: http://wiremock.org/
Awesome TC guide: http://blog.edseek.com/~jasonb/articles/traffic_shaping/
Stubbed Cassandra: http://scassandra.org
Wireshark: https://www.wireshark.org/
Saboteur: https://github.com/tomakehurst/saboteur
Example app + VM: https://github.com/chbatey/vagrant-wiremock-saboteur
THANKS FOR LISTENING@CHBATEY