The route towards cloud automation
description
Transcript of The route towards cloud automation
THE ROUTE TOWARDS CLOUD AUTOMATION
THE ROUTE TOWARDS CLOUD AUTOMATION
SIMPLY EVERY ENGINEER’S DESIRE TO USE THE FORCE
... CLOUD ...
... AUTOMATION
SO LIKE ...
And why you should careWho am I?
Automate the Cloud at
On the internet as..
@jcrugzz
and why this mattersWhat is Nodejitsu?
We execute
untrusted user code in the cloud using a system of..
Microservices
Words that I likeVocabulary
Determinism
Computers act consistently
Non-determinismComputers begin to be affected by Quantum properties and begin to act
inconsistently.
CLOUD AUTOMATION FOR MICROSERVICES
From one we have manyMicroservices and SOA
Monolithic Web Service Collection of Microservices
From one we have manyMicroservices and SOA
Monolithic Web Service Collection of Microservices
MICROSERVICES AND SOA TURN HARD COUPLING INTO LOOSE(R) COUPLING
ONE DOES NOT SIMPLY
SCALE ... ANYTHING
Patterns for scaling service architecturesMicroservices and SOA
Monolithic Web Service
Our only choice is to replicate the WHOLE SERVICE
AGAIN ...
... AND AGAIN ...
... AND AGAIN
Patterns for scaling service architecturesMicroservices and SOA
Microservices and SOA
` When you have them separated.. You can scale ...
EACH ...
... ONE ...
... INDIVIDUALLY
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
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
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
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
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
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
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
SAY MICROSERVICES
ONE MORE TIME!
SAY MICROSERVICES
ONE MORE TIME!
BUT SERIOUSLY...
Lets Make things Complicated
Because I said so
How many services do we have?!DevOps Mania
When things go wrong
` What happens when services go down..
ONE ...
... BY ...
... ONE
YES. YES IT IS
WE HAVE MONITORING
CALM DOWN
Get all the dataMonitoring: Collect Metrics
What do we collect?ALL THE METRICS!LogsMemoryRequests
Apps
Metrics!Cluster
What if we were generating data
and not using it at all?
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
“As intelligence goes up, happiness goes down. See, I made a graph. I make lots of graphs.” - Lisa Simpson
“As intelligence goes up, happiness goes down. See, I made a graph. I make lots of graphs.” - Lisa Simpson
“As intelligence goes up, happiness goes down. See, I made a graph. I make lots of graphs.” - Lisa Simpson
Act Now!
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
BRACE YOURSELVES
IT’S STORY TIME
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
FIX IT! FIX IT! FIX IT!
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
How do they work?
Distributed Systems
Use a distributed approachHow do we fix this?
Metrics!Cluster
Scale with a particular approachMake distributed
SSH Service
Load Balancer
Dead App
Fix it
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
Leader ElectionRaft: Distrubuted Consensus
A consensus AlgorithmLog replicationLeaders, Followers, CandidatesLeader election and failover
What is Raft?
Reading white papers
PapersDistributed Systems
Yes we should read themYes they are hardReading once is just the beginningConsider it like stretching
Reading?
OMG
BUT IM OVERWHELMED
Take a deep breathDistributed Systems
SIMPLICITYStart smallImportance of modulesEverything in stages
RELAX
Demo Architecture
DOGE FOR DEMO
github.com/jcrugzz/empirenode-demo
THE END
Jarrett Cruger - @jcrugzz