Slide 1

Slide 1 text

The Road to Success is paved with Small Improvements Daniel Schauenberg • [email protected] • @mrtazz

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

The Monolith

Slide 6

Slide 6 text

LAMP

Slide 7

Slide 7 text

We deploy quite a lot

Slide 8

Slide 8 text

How comfortable are you deploying a change right now

Slide 9

Slide 9 text

MTTR trumps MTBF

Slide 10

Slide 10 text

If this is your first day at Etsy you deploy the site

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

The Dark Past

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Hindsight is 20/20 There would be no Etsy I wasn't around for this (the grain of salt disclaimer)

Slide 15

Slide 15 text

dark less fun

Slide 16

Slide 16 text

Architecture Overview Ubuntu Postgresql Lighttpd PHP/Python

Slide 17

Slide 17 text

Single Big Database

Slide 18

Slide 18 text

Business Logic in Stored Procedures

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

silos

Slide 21

Slide 21 text

DEV ! DBA ! OPS

Slide 22

Slide 22 text

Sprouter

Slide 23

Slide 23 text

Stored Procedure Routing Middleware

Slide 24

Slide 24 text

"Now you don't have to touch the database"

Slide 25

Slide 25 text

A software manifestation of silos

Slide 26

Slide 26 text

Site uptime wasn't good

Slide 27

Slide 27 text

<3 uptime

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

Trust the people

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Sprouter

Slide 32

Slide 32 text

Master

Slide 33

Slide 33 text

Horizontal Scaling (A single box only scales so far)

Slide 34

Slide 34 text

Master-Master replicated MySQL Shards

Slide 35

Slide 35 text

Flickr DNA

Slide 36

Slide 36 text

Deploy != Release

Slide 37

Slide 37 text

Feature Flags

Slide 38

Slide 38 text

if Feature::isEnabled($feature) { // new hawtness } else { // nothing to see here }

Slide 39

Slide 39 text

Chef

Slide 40

Slide 40 text

<3 Chef

Slide 41

Slide 41 text

repo open to everyone everybody can make changes ~30 regular contributors

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

knife-spork knife-flip knife-lastrun knife-preflight knife-wip chef-whitelist

Slide 44

Slide 44 text

Feature Flags in Chef

Slide 45

Slide 45 text

if node.is_in_whitelist? "apache_upgrade" # new hawtness else # boring old stuff end

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

Confidence in Dev Environment

Slide 48

Slide 48 text

Developer VMs Every engineer has one Chef’d with the Etsy Stack Different sizes and Chef roles

Slide 49

Slide 49 text

Self Service

Slide 50

Slide 50 text

Continuous Integration

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

QA and Unit Staging Smoker Prod Smoker

Slide 53

Slide 53 text

> 2000 tests

Slide 54

Slide 54 text

Continuous Integration as the bottleneck of deployment

Slide 55

Slide 55 text

How to keep it fast?

Slide 56

Slide 56 text

SSDs!

Slide 57

Slide 57 text

Not Quite

Slide 58

Slide 58 text

The Bobs (our builders) LXC Containers 1 Jenkins Agent per Container 4 containers per SSD

Slide 59

Slide 59 text

Try

Slide 60

Slide 60 text

> try https://github.com/etsy/Trylib

Slide 61

Slide 61 text

The power of the CI Cluster The ease of your local environment

Slide 62

Slide 62 text

Thanks Mozilla

Slide 63

Slide 63 text

IRC

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

Deployinator

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

Simple Web Application

Slide 69

Slide 69 text

METRICS!

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

Ganglia & Graphite

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

StatsD "how do you know this works in production?"

Slide 74

Slide 74 text

Statsd::increment("foo") Statsd::timing("bar", 10)

Slide 75

Slide 75 text

Dashboard Framework

Slide 76

Slide 76 text

$graph = new Graph_Graphite_Simple( [ 'title' => 'Packets Received (nodejs)', 'metrics' => 'stats.%s.packets_received', 'limit_y_axis' => true, 'stacked' => true, 'width' => $width, ] )

Slide 77

Slide 77 text

Deploy Dashboard

Slide 78

Slide 78 text

“Finding your soul metric can take time. But in the end, it boils down to what matters most to your users.” Mathias Meyer, CEO Travis CI

Slide 79

Slide 79 text

Find the subset of metrics people should look at after a deploy

Slide 80

Slide 80 text

Stick them on a central place

Slide 81

Slide 81 text

Logs!

Slide 82

Slide 82 text

Syslog works really well

Slide 83

Slide 83 text

Decide on a log format

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

Awesome Tools

Slide 88

Slide 88 text

Empower the Individual

Slide 89

Slide 89 text

Information Overload

Slide 90

Slide 90 text

Tools need attention

Slide 91

Slide 91 text

Culture

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

realtalk: things break

Slide 99

Slide 99 text

New View

Slide 100

Slide 100 text

Complex Socio-Technical Systems

Slide 101

Slide 101 text

“Erkenntnis und Irrtum fließen aus denselben psychischen Quellen; nur der Erfolg vermag beide zu scheiden.” Ernst Mach, Erkenntnis und Irrtum (p. 116)

Slide 102

Slide 102 text

Success and failure can only be determined a posteriori

Slide 103

Slide 103 text

Things made sense at the time

Slide 104

Slide 104 text

People don't come to work to do a bad job

Slide 105

Slide 105 text

Nietzschean Anxiety

Slide 106

Slide 106 text

So I always get off the hook whatever I do?

Slide 107

Slide 107 text

depends

Slide 108

Slide 108 text

“There is a difference between explaining and excusing human performance.” Sidney Dekker, The Field Guide to Understanding Human Error (p. 196)

Slide 109

Slide 109 text

Blameless Postmortems

Slide 110

Slide 110 text

Open Meeting

Slide 111

Slide 111 text

Everybody is Invited

Slide 112

Slide 112 text

What happened?

Slide 113

Slide 113 text

Timeline

Slide 114

Slide 114 text

Describe the past Don't excuse it away

Slide 115

Slide 115 text

The Facilitator

Slide 116

Slide 116 text

Guide the Discussion

Slide 117

Slide 117 text

Look out for indicators of Old View thinking

Slide 118

Slide 118 text

Counterfactuals

Slide 119

Slide 119 text

she should have if they just had if he would have you failed to

Slide 120

Slide 120 text

Biases

Slide 121

Slide 121 text

Hindsight Bias Confirmation Bias Outcome Bias

Slide 122

Slide 122 text

there are many more

Slide 123

Slide 123 text

Who is in charge?

Slide 124

Slide 124 text

Etsy School

Slide 125

Slide 125 text

Taught Facilitator Course

Slide 126

Slide 126 text

3 x 90 minutes

Slide 127

Slide 127 text

Remediation Items

Slide 128

Slide 128 text

incorporate learning and takeaways from the meeting

Slide 129

Slide 129 text

No content

Slide 130

Slide 130 text

turn surprises into known factors

Slide 131

Slide 131 text

MORGUE

Slide 132

Slide 132 text

No content

Slide 133

Slide 133 text

No content

Slide 134

Slide 134 text

No content

Slide 135

Slide 135 text

No content

Slide 136

Slide 136 text

No content

Slide 137

Slide 137 text

No content

Slide 138

Slide 138 text

No content

Slide 139

Slide 139 text

https://github.com/etsy/morgue

Slide 140

Slide 140 text

Near Miss

Slide 141

Slide 141 text

"Hey all, I just ran rm -rf $DIR/ and since the variable was empty I deleted my whole VM. This would have been bad in production. Don't do that."

Slide 142

Slide 142 text

Pre Mortem

Slide 143

Slide 143 text

Architecture Reviews

Slide 144

Slide 144 text

Operability Reviews

Slide 145

Slide 145 text

“It is also worth pointing out that the bias towards investigating failures rather than success itself represents a trade-off.” Erik Hollnagel, The ETTO Principle: Efficiency-Thoroughness Trade-Off

Slide 146

Slide 146 text

Investigate Success

Slide 147

Slide 147 text

Why did it work?

Slide 148

Slide 148 text

Human Error is where you stopped looking

Slide 149

Slide 149 text

Learning > Blaming

Slide 150

Slide 150 text

No content

Slide 151

Slide 151 text

No content

Slide 152

Slide 152 text

How did we end up here?

Slide 153

Slide 153 text

No content

Slide 154

Slide 154 text

Overhauls & Iterations

Slide 155

Slide 155 text

Culture & Tools (you can't really have one without the other)

Slide 156

Slide 156 text

Humans are AWESOME

Slide 157

Slide 157 text

Nobody comes to work to do a bad job

Slide 158

Slide 158 text

Trust your Co-Workers

Slide 159

Slide 159 text

There is a lot of knowledge in your engineering team

Slide 160

Slide 160 text

Deploy (as often as it makes sense)

Slide 161

Slide 161 text

Collaborate (even if you think you don't have to)

Slide 162

Slide 162 text

No content

Slide 163

Slide 163 text

Listen (to problems and experiences of your coworkers)

Slide 164

Slide 164 text

Thank you!

Slide 165

Slide 165 text

codeascraft.com etsy.com/codeascraft/talks

Slide 166

Slide 166 text

The Road to Success is paved with Small Improvements Daniel Schauenberg • [email protected] • @mrtazz