winops conf 2016 - peter mounce - dos yourself in production every night to prove you can take it

42
1 DoS yourself in production every night to prove you can take it @petemounce @justeat_tech @petemounce + @justeat_tech

Upload: winops-conf

Post on 27-Jan-2017

129 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

1

DoS yourself inproduction everynight to prove you

can take it@petemounce@justeat_tech@petemounce + @justeat_tech

Page 2: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

@justeat_tech

2

Any questions?Shout them out as we go. That's more fun.

@petemounce + @justeat_tech

Page 3: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

3

Who are JUST EAT?

Page 4: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

4

Performance?

Page 5: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

5

When do you suppose peaktime is?

The same time we DoS ourselves, of course!

Page 6: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

6

We have cyclic demand

Page 7: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

7

The problem withcontinuous delivery

Everyone wants to change everything, all the time.

Page 8: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

8

Traditional approachLet's make an environment like

production and run load through that.

Page 9: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

9

Individual tests take toolong

Page 10: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

10

But of course...

Page 11: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

11

So, test all the time

Page 12: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

12

So, test in production

#YOLO!

We deploy 10s of small changes a dayand we have alerts. I bet we won't break

production (without noticing)

#WhatCouldPossiblyGoWrong?

Let's just do it in production with faketraffic at the same time as customers!

Page 13: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

13

Reasons why this isn'tinsane

Page 14: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

14

How did we start doing this?Technology aspects and people aspects

Page 15: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

15

Have the idea to start( )We didn't invent this

Page 16: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

16

Choose scenarios we care about

Page 17: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

17

Choose a load agent

Page 18: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

18

Gain confidence outside of peak time(This part is also about reassuring stakeholders that you've

got it all under control...)

Page 19: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

19

Start adding data variety

Page 20: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

20

Make the computer do it every dayThis is the most vital part!

Page 21: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

21

Get more elaborate laterFake away external dependencies

x‐traffic‐flavour: fake

Page 22: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

22

And even more elaborate...Fake away more complicated things

Page 23: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

23

How have we kept doingthis?

... and what did we learn to do better

Page 24: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

24

Didn't allow tests to be red (for long)

Page 25: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

25

Needed to tune levels over time

Page 26: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

26

Got smarter about data management

Page 27: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

27

Embraced the fact that things break

Page 28: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

28

What battle scars did weget... lately?

All of these would have hurt badly if we hadn't had theability to turn the pain off ourselves

Page 29: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

29

Find unbounded result sets beforecustomers

Page 30: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

30

Monitoring needs to be solid!

Page 31: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

31

Realise AWS account limits are closerthan we thought...

Credit: StickerMule.com

Page 32: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

32

Realise haproxy should balance, notmagnify load...

Page 33: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

33

Realise we're not as smart as wethink...

Dear WinOps.org, this is why I had to leave early lastyear...

Page 34: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

34

But...Discovered problems during peacetime, not peak time

Page 35: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

35

What did we gain?

Page 36: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

36

Peace of mind, #1Continuous, early, warning about:

Getting slowerRunning out of capacity

Page 37: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

37

Peace of mind, #2Good, simple, clear operational response to most surprises:

Is fake load running? Stop it.

Scale up

Now, start to think

Page 38: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

38

Peace of mind, #3If we find a problem Thursday night:

1. Turn off fake load for the weekend2. Enjoy weekend3. Fix it next week with less pressure

Page 39: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

39

Performance & operability == 1stclass concern

Page 40: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

40

Alerts become automated tests inproduction

Page 41: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

41

git push production is one stepcloser

Continuous testing in production can be applied to morethan just performance & capacity

Page 42: WinOps Conf 2016 - Peter Mounce - DoS yourself in production every night to prove you can take it

42

Online takeaway. Harderthan you might think

We've got many open spots for talented engineers (London,Bristol, Kiev), if you're interested.

tech.just­eat.com/jobs

Get in touch ­ peter.mounce@just­eat.com