Computational Patterns of the Cloud - QCon NYC 2014
-
Upload
ines-sombra -
Category
Technology
-
view
204 -
download
0
description
Transcript of Computational Patterns of the Cloud - QCon NYC 2014
![Page 1: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/1.jpg)
Computational Patterns of the
CloudQCon NYC 2014
![Page 3: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/3.jpg)
![Page 4: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/4.jpg)
Continuous Everything
Today’s Agenda
Distributed Systems
Harvesting Services
Reclaimable Resources
![Page 5: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/5.jpg)
Reclaimable ResourcesPattern 1: Where things start
![Page 6: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/6.jpg)
Pre-Cloud Applications
We have an application ready for deployment
Ticket to request resources
( budgets )Procurement
Roll to production on a hand-crafted server
Maintenance
Uptime Burden
![Page 7: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/7.jpg)
Cloud Applications
We have an application ready for deployment
Provision servers on demand (via APIs) & deploy to production
Maintenance ( for used resources only)
Pay
Uptime Burden
![Page 8: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/8.jpg)
gordolo.engineyard.com
Pets vs Cattle
vm002.engineyard.com
Both are
adorbs!
![Page 9: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/9.jpg)
Maintain
Cloud resources are Reused
ConsumeProvision
Release
* And things are ”elastic”
![Page 10: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/10.jpg)
Our experience + a few stories
![Page 11: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/11.jpg)
Everything fails.
* At the worst time, for realsies
![Page 12: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/12.jpg)
Excel at ProcessAnticipate failure
and plan for itUse postmortems, checklists, retrospectives, and play-books
Take them seriously
Also know that state can bite
![Page 13: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/13.jpg)
Everything is a recipeInfrastructure is maintained as code
Resources are used to increase the availability & redundancy of applications
“A self service cloud makes
impossible things instant”
@adrianco
![Page 14: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/14.jpg)
Challenges
![Page 15: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/15.jpg)
Importance of Monitoring & Benchmarking
Know your baseline *
Alerting & monitoring are critical
Benchmarking is still misunderstood
![Page 16: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/16.jpg)
What does healthy mean?
Many elements in place to determine health
These visualizations fail us. We need better ones
Complexity is complex
![Page 17: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/17.jpg)
What does healthy mean?
Many elements in place to determine health
These visualizations fail us. We need better ones
Complexity is complex
Instance provisioned?
IaaS
Firewalls set up?
IaaS
Chef succeeded?
PaaSVolumes provisioned?
IaaS
Process running?
Role
Replica up?
PaaS
![Page 18: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/18.jpg)
Resource families match use casesSome awareness is needed
Cloud resources are different than hardware-based
Capacity planning is tricky
![Page 19: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/19.jpg)
Think about cloud resources in fluid
terms: compute & release
compute with: the cloud as A collection of disposable resources
* Awareness is not optional
![Page 20: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/20.jpg)
Harvesting ServicesPattern 2: We have resources, now let’s leverage services
![Page 21: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/21.jpg)
App Design for the cloud
Surrender the filesystem1
Our app becomes an aggregate of services
2
Consume services via APIs3
![Page 22: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/22.jpg)
Service oriented architecture
NoSQL Distilled: Fowler & Sadalage
My awesome e-commerce site
Shopping cart & session data
Completed orders
Inventory and item pricing
Session Storage service
K/V Store
Order Persistence service
Document Store
Inventory & Price service
RDBMS
Nodes and relations service
Graph Store
Recommendations engine
![Page 23: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/23.jpg)
Our experience + a few stories
![Page 24: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/24.jpg)
Cloud
The monorail that grewUI
Provisioning
API
Billing
Partners
![Page 25: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/25.jpg)
Cloud
The monorail that grewUI
Provisioning
API
Billing
Partners
ui.engineyard.com
Provisioner (Smithy)
API (Core)
Billing (Johnny Cash)
Partners (Tres Fiestas)
![Page 26: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/26.jpg)
The coupling that shouldn’t be
Cloud
UI
Provisioning
API
Billing
Partners
![Page 27: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/27.jpg)
The coupling that shouldn’t be
Provisioner (Smithy)
Cloud
UI
Provisioning
API
Billing
Partners
![Page 28: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/28.jpg)
Challenges
![Page 29: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/29.jpg)
Operational experience can become siloedTeams built around services
Knowledge boundaries
Geographical distribution
![Page 30: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/30.jpg)
Service dependency and failure planning
Difficult to assert health in apps that consume services
Each service it’s its own (smaller) failure domain
![Page 31: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/31.jpg)
Importance of API design,maintenance, & deprecationAPI design is a core business competency
Prioritize maintenance
Retirement will happen
![Page 32: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/32.jpg)
Think about your app as a: collection
of services connected via APIs
compute with: Cloud applications leveraging services
![Page 33: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/33.jpg)
Distributed SystemsPattern 3: Resources + services make distributed systems
as the new norm
![Page 34: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/34.jpg)
It’s a clustered world
![Page 35: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/35.jpg)
with properties & constraints
* Tip: Read `Distributed systems and the end of the API in references
Distributed systems exhibit a set of uniformly unintuitive
behaviors related to causality, consistency, and availability *
![Page 36: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/36.jpg)
Our experience + a few stories
![Page 37: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/37.jpg)
Availability & Coordination
Failures & latency
Degradation
Dependencies
![Page 38: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/38.jpg)
Find the failing node
Stressing Failures and
adding automation
Serf cluster membershipHomegrown stonith
![Page 39: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/39.jpg)
Challenges
![Page 40: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/40.jpg)
What does it mean to be up?
Distributed systems will break in interesting and painful ways
Know your dependencies
![Page 41: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/41.jpg)
Distributed tracing is necessary
Debugging the “it’s slow” problem sucks
Inherently complex to simulate & test
![Page 42: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/42.jpg)
Awareness of theory Matters
@seancribbs
![Page 43: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/43.jpg)
Distributed systems are the foundation of our infrastructure
& services
compute with: Cloud apps forming distributed systems
![Page 44: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/44.jpg)
Continuous EverythingPattern 4: cloud systems enable continuity
![Page 45: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/45.jpg)
CD and the importance of tests
Are they fast?Can we trust them?
What coverage do we have?
What type of tests?
* Don’t ignore their maintenance
Tests are
critical
![Page 46: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/46.jpg)
Our experience + a few stories
![Page 47: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/47.jpg)
Our continuous Integration
Branches
Pull Requests
Test suites
Merge & deploy
![Page 48: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/48.jpg)
Any prod deploy
Kicks off a suite
Our testing evolutionMaster
PRsKick off a
suite
Dredd TestsSystems,
boundaries, & integration
StacksOS + Our
Image
ScenarioLive setup + assertions
SuiteCollection of
scenarios
![Page 49: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/49.jpg)
Any prod deploy
Kicks off a suite
Our testing evolutionMaster
PRsKick off a
suite
Dredd TestsSystems,
boundaries, & integration
StacksOS + Our
Image
ScenarioLive setup + assertions
SuiteCollection of
scenarios
A r e D a t a b a s e s ?
I n s t a l l i n g
B a c k i n g U p
R e s t o r i n g
S e t t i n g U p R e p l i c a t i o n
P r o m o t i n g R e p l i c a s
W r i t e a b l e
![Page 50: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/50.jpg)
Challenges
![Page 51: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/51.jpg)
Many testing choices. And a random note.Testing is critical and frameworks should help by streamlining choices
Automation helps with process & certifications (SOCS2)
![Page 52: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/52.jpg)
All planning tools suck
Stop thinking that a tool will fix your agile problems
Continuous delivery can make flaws in goals & direction obvious. Is your vision clear?
![Page 53: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/53.jpg)
Cloud-based apps, resources, and services enable
agility
compute with: Cloud (resources, apps, services) as continuous
* “The bottleneck is never code or creativity; it's lack of clarity.”Scott Berkun
![Page 54: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/54.jpg)
Quickly provision resources & release them when they are not needed
Reclaimable Resources
Leverage services to simplify areas of responsibility in our app
Harvesting services
Theoretical foundation as a core competency for correctness
Distributed Systems
The holy grail. Will reshape your company & make everything awesome
Continuous Delivery
tl;drthis will save
you 40 minutes
![Page 55: Computational Patterns of the Cloud - QCon NYC 2014](https://reader037.fdocuments.in/reader037/viewer/2022102603/547c2140b4af9fee468b495d/html5/thumbnails/55.jpg)
Cloud computing next“…This is how cloud computing will continue to evolve. Developers will worry less about the thousands of machines needed to run their
application and more about the design of the application itself.” Eric Brewer