disappointing disasters & other y2k - usenix · microservices and loose coupling fault-tolerant...

45
@wiredferret Y2K & Other Disappointing Disasters Risk Reduction and Harm Mitigation

Upload: others

Post on 24-Jun-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Y2K & Other Disappointing Disasters

Risk Reduction and Harm Mitigation

Page 2: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 3: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

An actual pager

Page 4: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Ready for the big night

Page 5: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

We actually worried

Page 6: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

This was a vital job

Page 7: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 8: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

No one remembers the crisis averted.

Page 9: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Risk Reduction

Page 10: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Risk Reduction

● Vaccination● Anti-lock

brakes● Train gates

Page 11: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

How to reduce risk

Page 12: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Secure your zone

Page 13: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 14: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Predict states

Page 15: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret | DevOpsDays Vancouver | #softwareseatbelt

State machine

Input: ZIP codeStates: <several>Transitions: Submit or refuse

Page 16: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Accept Risk

● You can’t prevent everything

● Decide what matters to save

● Make mindful tradeoffs based on data

Page 17: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Harm Mitigation

Page 18: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

When Things Go

Wrong

● Seatbelts● Building codes● RAID

Page 19: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 20: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 21: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

How to mitigate harm

Page 22: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Fail safe or fail secure?

● What are you protecting?

● What is your risk?

Page 23: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Assume failure

● Failure is almost always an oversight

● Test with many audiences

● You can’t prevent all failures

● Make failure less catastrophic

Page 24: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Predict states

I � state machines

Page 25: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Failure is inevitable.

Disaster is not.

Page 26: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

It’s complicated and hard

Page 27: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 28: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Combinatoric Testing Complexity

Page 29: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 30: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

What’s a disaster?

Page 31: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 32: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Page 33: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Let’s design for that

Page 34: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

Fizzle factors

● Microservices and loose coupling

● Fault-tolerant messaging● Data duplication● Canary launches● Kill switches and circuit

breakers● Automatic recovery● Testing for load, stress,

and outage

Page 35: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Microservices and loose coupling

Page 36: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Fault-tolerant messaging

Page 37: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Data duplication

Page 38: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Canary launches

Page 39: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Kill switches and circuit breakers

Page 40: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Automatic recovery

Page 41: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

Testing for load, stress and outage

Page 42: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret

tl;rt● Expect failure● Make systems less

rigid● Plan for disaster● Degrade gracefully

Page 43: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

launchdarkly.com/heidi

Page 44: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret | DevOpsDays Vancouver | #softwareseatbelt

THE careful text-books measure

(Let all who build beware!)

The load, the shock, the pressure

Material can bear.

So, when the buckled girder

Lets down the grinding span,

'The blame of loss, or murder,

Is laid upon the man.

Not on the Stuff - the Man!

The Hymn of Breaking Strain

But in our daily dealing

With stone and steel, we find

The Gods have no such feeling

Of justice toward mankind.

To no set gauge they make us-

For no laid course prepare-

And presently o'ertake us

With loads we cannot bear:

Too merciless to bear.

The prudent text-books give it

In tables at the end

'The stress that shears a rivet

Or makes a tie-bar bend-

'What traffic wrecks macadam-

What concrete should endure-

but we, poor Sons of Adam

Have no such literature,

To warn us or make sure!

Page 45: Disappointing Disasters & Other Y2K - USENIX · Microservices and loose coupling Fault-tolerant messaging Data duplication Canary launches Kill switches and circuit breakers Automatic

@wiredferret | DevOpsDays Vancouver | #softwareseatbelt

We hold all Earth to plunder -

All Time and Space as well-

Too wonder-stale to wonder

At each new miracle;

Till, in the mid-illusion

Of Godhead 'neath our hand,

Falls multiple confusion

On all we did or planned-

The mighty works we planned.

We only of Creation

(0h, luckier bridge and rail)

Abide the twin damnation-

To fail and know we fail.

Yet we - by which sole token

We know we once were Gods-

Take shame in being broken

However great the odds-

The burden of the Odds.

Oh, veiled and secret Power

Whose paths we seek in vain,

Be with us in our hour

Of overthrow and pain;

That we - by which sure token

We know Thy ways are true -

In spite of being broken,

Because of being broken

May rise and build anew

Stand up and build anew.

-- Rudyard Kipling