56
Computational Patterns of the Cloud QCon NYC 2014

Computational Patterns of the Cloud - QCon NYC 2014

Embed Size (px)

DESCRIPTION

The Cloud has undoubtedly changed the way we think about computing, IT operations, innovation, and entrepreneurship. But what are the computational patterns that have emerged from the pervasiveness of public clouds? What can we leverage to improve our organizations? And what are the challenges that we face going forward? In this talk, I will introduce you to cloud computing’s paradigms and discuss their applications with practical examples from Engine Yard’s customers, peers, and partners. We will also cover antipatterns and myths. If you are curious about Cloud computing or want to improve your cloud strategy this talk is for you. NOTE: Open an issue if you want me to explain something in more detail at the accompanying github repo: https://github.com/Randommood/QConNYC2014/

Citation preview

Page 1: Computational Patterns of the Cloud - QCon NYC 2014

Computational Patterns of the

CloudQCon NYC 2014

Page 2: Computational Patterns of the Cloud - QCon NYC 2014

Inés Sombra

Data Engineer

@Randommood

[email protected]

Page 3: Computational Patterns of the Cloud - QCon NYC 2014
Page 4: Computational Patterns of the Cloud - QCon NYC 2014

Continuous Everything

Today’s Agenda

Distributed Systems

Harvesting Services

Reclaimable Resources

Page 5: Computational Patterns of the Cloud - QCon NYC 2014

Reclaimable ResourcesPattern 1: Where things start

Page 6: Computational Patterns of the Cloud - QCon NYC 2014

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

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

gordolo.engineyard.com

Pets vs Cattle

vm002.engineyard.com

Both are

adorbs!

Page 9: Computational Patterns of the Cloud - QCon NYC 2014

Maintain

Cloud resources are Reused

ConsumeProvision

Release

* And things are ”elastic”

Page 10: Computational Patterns of the Cloud - QCon NYC 2014

Our experience + a few stories

Page 11: Computational Patterns of the Cloud - QCon NYC 2014

Everything fails.

* At the worst time, for realsies

Page 12: Computational Patterns of the Cloud - QCon NYC 2014

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

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

Challenges

Page 15: Computational Patterns of the Cloud - QCon NYC 2014

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

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

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

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

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

Harvesting ServicesPattern 2: We have resources, now let’s leverage services

Page 21: Computational Patterns of the Cloud - QCon NYC 2014

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

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

Our experience + a few stories

Page 24: Computational Patterns of the Cloud - QCon NYC 2014

Cloud

The monorail that grewUI

Provisioning

API

Billing

Partners

Page 25: Computational Patterns of the Cloud - QCon NYC 2014

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

The coupling that shouldn’t be

Cloud

UI

Provisioning

API

Billing

Partners

Page 27: Computational Patterns of the Cloud - QCon NYC 2014

The coupling that shouldn’t be

Provisioner (Smithy)

Cloud

UI

Provisioning

API

Billing

Partners

Page 28: Computational Patterns of the Cloud - QCon NYC 2014

Challenges

Page 29: Computational Patterns of the Cloud - QCon NYC 2014

Operational experience can become siloedTeams built around services

Knowledge boundaries

Geographical distribution

Page 30: Computational Patterns of the Cloud - QCon NYC 2014

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

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

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

Distributed SystemsPattern 3: Resources + services make distributed systems

as the new norm

Page 34: Computational Patterns of the Cloud - QCon NYC 2014

It’s a clustered world

Page 35: Computational Patterns of the Cloud - QCon NYC 2014

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

Our experience + a few stories

Page 37: Computational Patterns of the Cloud - QCon NYC 2014

Availability & Coordination

Failures & latency

Degradation

Dependencies

Page 38: Computational Patterns of the Cloud - QCon NYC 2014

Find the failing node

Stressing Failures and

adding automation

Serf cluster membershipHomegrown stonith

Page 39: Computational Patterns of the Cloud - QCon NYC 2014

Challenges

Page 40: Computational Patterns of the Cloud - QCon NYC 2014

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

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

Awareness of theory Matters

@seancribbs

Page 43: Computational Patterns of the Cloud - QCon NYC 2014

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

Continuous EverythingPattern 4: cloud systems enable continuity

Page 45: Computational Patterns of the Cloud - QCon NYC 2014

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

Our experience + a few stories

Page 47: Computational Patterns of the Cloud - QCon NYC 2014

Our continuous Integration

Branches

Pull Requests

Test suites

Merge & deploy

Page 48: Computational Patterns of the Cloud - QCon NYC 2014

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

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

Challenges

Page 51: Computational Patterns of the Cloud - QCon NYC 2014

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

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

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

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

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

Page 56: Computational Patterns of the Cloud - QCon NYC 2014

Thank you@randommood [email protected]

github.com/Randommood/Qconnyc2014