the route towards cloud automation

49
THE ROUTE TOWARDS CLOUD AUTOMATION

Upload: jcrugzz

Post on 19-Jun-2015

201 views

Category:

Software


2 download

DESCRIPTION

EmpireNode 2014 talk about the route towards cloud automation. How do we work towards a self-healing cloud

TRANSCRIPT

Page 1: The route towards cloud automation

THE ROUTE TOWARDS CLOUD AUTOMATION

Page 2: The route towards cloud automation

THE ROUTE TOWARDS CLOUD AUTOMATION

SIMPLY EVERY ENGINEER’S DESIRE TO USE THE FORCE

Page 3: The route towards cloud automation

... CLOUD ...

... AUTOMATION

SO LIKE ...

Page 4: The route towards cloud automation

And why you should careWho am I?

Automate the Cloud at

On the internet as..

@jcrugzz

Page 5: The route towards cloud automation

and why this mattersWhat is Nodejitsu?

We execute

untrusted user code in the cloud using a system of..

Microservices

Page 6: The route towards cloud automation

Words that I likeVocabulary

Determinism

Computers act consistently

Non-determinismComputers begin to be affected by Quantum properties and begin to act

inconsistently.

Page 7: The route towards cloud automation

CLOUD AUTOMATION FOR MICROSERVICES

Page 8: The route towards cloud automation

From one we have manyMicroservices and SOA

Monolithic Web Service Collection of Microservices

Page 9: The route towards cloud automation

From one we have manyMicroservices and SOA

Monolithic Web Service Collection of Microservices

MICROSERVICES AND SOA TURN HARD COUPLING INTO LOOSE(R) COUPLING

Page 10: The route towards cloud automation

ONE DOES NOT SIMPLY

SCALE ... ANYTHING

Page 11: The route towards cloud automation

Patterns for scaling service architecturesMicroservices and SOA

Monolithic Web Service

Our only choice is to replicate the WHOLE SERVICE

AGAIN ...

... AND AGAIN ...

... AND AGAIN

Page 12: The route towards cloud automation

Patterns for scaling service architecturesMicroservices and SOA

Microservices and SOA

` When you have them separated.. You can scale ...

EACH ...

... ONE ...

... INDIVIDUALLY

Page 13: The route towards cloud automation

YO DAWG I HEARD YOU LIKE MICROSERVICES

SO I PUT A GEOENCODING SERVICE IN A QUEUE SERVICE IN A FACEBOOK SERVICE IN A TWITTER SERVICE SO YOU CAN USE MICROSERVICES WHILE YOU USE MICROSERVICES

Page 14: The route towards cloud automation

YO DAWG I HEARD YOU LIKE MICROSERVICES

SO I PUT A GEOENCODING SERVICE IN A QUEUE SERVICE IN A FACEBOOK SERVICE IN A TWITTER SERVICE SO YOU CAN USE MICROSERVICES WHILE YOU USE MICROSERVICES

DON’T GET CARRIED AWAY

Page 15: The route towards cloud automation

Unix philosophy for software servicesMicroservices and SOA

Unix Philosophy

Do one thing and one thing well

Modularity and reusability

Streams!

SIMPLICTY!

"We should have some ways of connecting programs like garden hose--screw in another segment when it becomes necessary to massage data in another way. This is the way of IO also.” !—Doug McIlroy. October 11, 1964

Page 16: The route towards cloud automation

Unix philosophy for software servicesMicroservices and SOA

Unix Philosophy

Do one thing and one thing well

Modularity and reusability

Streams!

SIMPLICTY!

"We should have some ways of connecting programs like garden hose--screw in another segment when it becomes necessary to massage data in another way. This is the way of IO also.” !—Doug McIlroy. October 11, 1964

Page 17: The route towards cloud automation

It’s kind of like “small modules”Microservices and SOA

Node and Microservices

They go hand in hand

Products not projects - Martin Fowler

Think MODULE === Microservice

API Simplicity

Page 18: The route towards cloud automation

Problems and illusionsMicroservices and SOA

`

Illusions?

Silver Bullet Better Availability

Easier Scaling

Eliminates SPOFProblems

You now have N number of SPOF

More moving parts

Increased surface area for failure

Overall increase in non-determinism

Page 19: The route towards cloud automation

Problems and illusionsMicroservices and SOA

`

Illusions?

Silver Bullet Better Availability

Easier Scaling

Eliminates SPOFProblems

You now have N number of SPOF

More moving parts

Increased surface area for failure

Overall increase in non-determinism

BUT ITS ALL OK! !

Everything has tradeoffs !

Nothing is Perfect

Page 20: The route towards cloud automation

SAY MICROSERVICES

ONE MORE TIME!

Page 21: The route towards cloud automation

SAY MICROSERVICES

ONE MORE TIME!

BUT SERIOUSLY...

Page 22: The route towards cloud automation

Lets Make things Complicated

Because I said so

Page 23: The route towards cloud automation

How many services do we have?!DevOps Mania

When things go wrong

` What happens when services go down..

ONE ...

... BY ...

... ONE

Page 24: The route towards cloud automation
Page 25: The route towards cloud automation

YES. YES IT IS

Page 26: The route towards cloud automation

WE HAVE MONITORING

CALM DOWN

Page 27: The route towards cloud automation

Get all the dataMonitoring: Collect Metrics

What do we collect?ALL THE METRICS!LogsMemoryRequests

Apps

Metrics!Cluster

Page 28: The route towards cloud automation

What if we were generating data

and not using it at all?

Page 29: The route towards cloud automation

What are we looking atMonitoring. Next steps

Assess the data

Metrics!Cluster

StrategiesStore the dataGraphs are your friend

Apps

Find trends and bridge correlations

Data Store

Page 30: The route towards cloud automation
Page 31: The route towards cloud automation

“As intelligence goes up, happiness goes down. See, I made a graph. I make lots of graphs.” - Lisa Simpson

Page 32: The route towards cloud automation

“As intelligence goes up, happiness goes down. See, I made a graph. I make lots of graphs.” - Lisa Simpson

Page 33: The route towards cloud automation

“As intelligence goes up, happiness goes down. See, I made a graph. I make lots of graphs.” - Lisa Simpson

Act Now!

Page 34: The route towards cloud automation

Do something!Monitoring: Now what?

Metrics!Cluster

Actions to take Fix somethingScale up/down

Apps

Remove server from pool

Data Store

Take Action

“Action” Services

Page 35: The route towards cloud automation

BRACE YOURSELVES

IT’S STORY TIME

Page 36: The route towards cloud automation

Lets fix thingsSSH Micro-service

Metrics!Cluster

It is all in the simplicityIdentified problemCrafted a solutionPut together the pieces to fix it

An action

SSH Service

Load Balancer

Dead App

Fix it

Page 37: The route towards cloud automation

FIX IT! FIX IT! FIX IT!

Page 38: The route towards cloud automation

Welcome to distributed systemsWhat’s the problem?

Metrics!Cluster

Simplicity can lack flexibilityNo built in fault tolerance to serviceUses a local queue that doesn’t scaleBut this is still all fixable

Not distributed

SSH Service

Load Balancer

Dead App

Fix it

Page 39: The route towards cloud automation

How do they work?

Distributed Systems

Page 40: The route towards cloud automation

Use a distributed approachHow do we fix this?

Metrics!Cluster

Scale with a particular approachMake distributed

SSH Service

Load Balancer

Dead App

Fix it

Page 41: The route towards cloud automation

Use a distributed approachHow do we fix this?

Metrics!Cluster

Scale with a particular approachUse a proven distributed protocol (raft)Use a working module or implement itRead the white paper and test

Make distributed

SSH Service

Load Balancer

Dead App

Fix it

Page 42: The route towards cloud automation

Leader ElectionRaft: Distrubuted Consensus

A consensus AlgorithmLog replicationLeaders, Followers, CandidatesLeader election and failover

What is Raft?

Page 43: The route towards cloud automation

Reading white papers

Page 44: The route towards cloud automation

PapersDistributed Systems

Yes we should read themYes they are hardReading once is just the beginningConsider it like stretching

Reading?

Page 45: The route towards cloud automation

OMG

BUT IM OVERWHELMED

Page 46: The route towards cloud automation

Take a deep breathDistributed Systems

SIMPLICITYStart smallImportance of modulesEverything in stages

RELAX

Page 47: The route towards cloud automation

Demo Architecture

Page 48: The route towards cloud automation

DOGE FOR DEMO

github.com/jcrugzz/empirenode-demo

Page 49: The route towards cloud automation

THE END

Jarrett Cruger - @jcrugzz