98
State of the Art in Microservices Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures Microxchg Berlin - February 2015

State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

State of the Art in Microservices

Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures

Microxchg Berlin - February 2015

Page 2: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Speeding up Development Microservice Architectures

What’s Next

Page 3: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Why am I here?

%*&!”

By Simon Wardley http://enterpriseitadoption.com/

Page 4: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Why am I here?

%*&!”

By Simon Wardley http://enterpriseitadoption.com/

2009

Page 5: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Why am I here?

%*&!”

By Simon Wardley http://enterpriseitadoption.com/

2009

Page 6: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Why am I here?

@adrianco’s job at the intersection of cloud and Enterprise IT, looking for disruption and opportunities.

%*&!”

By Simon Wardley http://enterpriseitadoption.com/

20142009

Page 7: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Why am I here?

@adrianco’s job at the intersection of cloud and Enterprise IT, looking for disruption and opportunities.

%*&!”

By Simon Wardley http://enterpriseitadoption.com/

20142009

Example: Docker wasn’t on anyone’s roadmap for 2014. It’s on everyone’s roadmap for 2015.

Page 8: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

2014 was the year that Enterprises finally embraced cloud and DevOps.

Page 9: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

2014 was the year that Enterprises finally embraced cloud and DevOps.

Page 10: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

2014 was the year that Enterprises finally embraced cloud and DevOps.

Page 11: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

2014 was the year that Enterprises finally embraced cloud and DevOps.

Page 12: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

What does @adrianco do?

@adrianco

Technology Due Diligence on Deals

Presentations at Conferences

Presentations at Companies

Technical Advice for Portfolio Companies

Program Committee for Conferences

Networking with Interesting PeopleTinkering with

Technologies

Maintain Relationship with Cloud Vendors

Page 13: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Product Development

Processes

Page 14: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Assumption: Process prevents

problems

Page 15: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Organizations build up slow complex “Scar

tissue” processes

Page 16: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act Continuous Delivery

Page 17: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Measure Customers

Continuous Delivery

Page 18: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

INNOVATION

Measure Customers

Continuous Delivery

Page 19: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

Model Hypotheses

INNOVATION

Measure Customers

Continuous Delivery

Page 20: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

Model Hypotheses

BIG DATA

INNOVATION

Measure Customers

Continuous Delivery

Page 21: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Model Hypotheses

BIG DATA

INNOVATION

Measure Customers

Continuous Delivery

Page 22: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

Measure Customers

Continuous Delivery

Page 23: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Incremental Features

Automatic Deploy

Launch AB Test

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

Measure Customers

Continuous Delivery

Page 24: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Incremental Features

Automatic Deploy

Launch AB Test

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

CLOUD

Measure Customers

Continuous Delivery

Page 25: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Incremental Features

Automatic Deploy

Launch AB Test

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

CLOUD

Measure Customers

Continuous Delivery

Page 26: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Incremental Features

Automatic Deploy

Launch AB Test

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

CLOUD

Measure Customers

Continuous Delivery

Page 27: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Breaking Down the SILOs

Page 28: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

Mgr

Page 29: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

Mgr

Product Team Using Monolithic DeliveryProduct Team Using Monolithic Delivery

Page 30: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

MgrProduct Team Using Microservices

Product Team Using Monolithic Delivery

Product Team Using Microservices

Product Team Using Microservices

Product Team Using Monolithic Delivery

Page 31: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

MgrProduct Team Using Microservices

Product Team Using Monolithic Delivery

Platform TeamProduct Team Using Microservices

Product Team Using Microservices

Product Team Using Monolithic Delivery

Page 32: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

MgrProduct Team Using Microservices

Product Team Using Monolithic Delivery

Platform TeamA P IProduct Team Using Microservices

Product Team Using Microservices

Product Team Using Monolithic Delivery

Page 33: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

MgrProduct Team Using Microservices

Product Team Using Monolithic Delivery

Platform Team

DevOps is a Re-Org!

A P IProduct Team Using Microservices

Product Team Using Microservices

Product Team Using Monolithic Delivery

Page 34: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Release Plan

Developer

Developer

Developer

Developer

Developer

QA Release Integration

Ops Replace Old With New

Release

Monolithic service updates

Works well with a small number of developers and a single language like php, java or ruby

Page 35: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Release Plan

Developer

Developer

Developer

Developer

Developer

QA Release Integration

Ops Replace Old With New

Release

Bugs

Monolithic service updates

Works well with a small number of developers and a single language like php, java or ruby

Page 36: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Release Plan

Developer

Developer

Developer

Developer

Developer

QA Release Integration

Ops Replace Old With New

Release

Bugs

Bugs

Monolithic service updates

Works well with a small number of developers and a single language like php, java or ruby

Page 37: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developer

Developer

Developer

Developer

Developer

Old Release Still Running

Release Plan

Release Plan

Release Plan

Release Plan

Immutable microservice deployment scales, is faster with large teams and diverse platform components

Page 38: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developer

Developer

Developer

Developer

Developer

Old Release Still Running

Release Plan

Release Plan

Release Plan

Release Plan

Deploy Feature to Production

Deploy Feature to Production

Deploy Feature to Production

Deploy Feature to Production

Immutable microservice deployment scales, is faster with large teams and diverse platform components

Page 39: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developer

Developer

Developer

Developer

Developer

Old Release Still Running

Release Plan

Release Plan

Release Plan

Release Plan

Deploy Feature to Production

Deploy Feature to Production

Deploy Feature to Production

Deploy Feature to Production

Bugs

Immutable microservice deployment scales, is faster with large teams and diverse platform components

Page 40: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developer

Developer

Developer

Developer

Developer

Old Release Still Running

Release Plan

Release Plan

Release Plan

Release Plan

Deploy Feature to Production

Deploy Feature to Production

Deploy Feature to Production

Deploy Feature to Production

Bugs

Deploy Feature to Production

Immutable microservice deployment scales, is faster with large teams and diverse platform components

Page 41: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Configure

Configure

Developer

Developer

Developer

Release Plan

Release Plan

Release Plan

Deploy Standardized

Services

Standardized portable container deployment saves time and effort

https://hub.docker.com

Page 42: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Configure

Configure

Developer

Developer

Developer

Release Plan

Release Plan

Release Plan

Deploy Standardized

Services

Deploy Feature to Production

Deploy Feature to Production

Deploy Feature to Production

Bugs

Deploy Feature to Production

Standardized portable container deployment saves time and effort

https://hub.docker.com

Page 43: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developer Developer

Run What You Wrote

Developer Developer

Page 44: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developer Developer

Run What You Wrote

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Developer Developer

Page 45: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developer Developer

Run What You Wrote

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Developer Developer

Monitoring Tools

Page 46: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

DeveloperDeveloper Developer

Run What You Wrote

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Developer Developer

Monitoring Tools

Page 47: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

DeveloperDeveloper Developer

Run What You Wrote

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Developer Developer

Site Reliability

Monitoring Tools

Availability Metrics

99.95% customer success rate

Page 48: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

DeveloperDeveloper Developer

Run What You Wrote

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Developer Developer

Manager Manager

Site Reliability

Monitoring Tools

Availability Metrics

99.95% customer success rate

Page 49: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

DeveloperDeveloper Developer

Run What You Wrote

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Micro service

Developer Developer

Manager Manager

VP Engineering

Site Reliability

Monitoring Tools

Availability Metrics

99.95% customer success rate

Page 50: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

What Happened?Rate of change

increased

Cost and size and risk of change

reduced

Page 51: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developing at the Speed of Docker

Developers • Compile/Build • Seconds

Extend container • Package dependencies • Seconds

PaaS deploy Container • Docker startup • Seconds

Page 52: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Developing at the Speed of Docker

Speed is addictive, hard to go back to taking much longer to get things done

Developers • Compile/Build • Seconds

Extend container • Package dependencies • Seconds

PaaS deploy Container • Docker startup • Seconds

Page 53: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Disruptor: Continuous Delivery with

Containerized Microservices

Page 54: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

"This is the IT swamp draining manual for anyone who is neck deep in alligators.”

1984 2014

Page 55: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Microservices

Page 56: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

A Microservice Definition !

Loosely coupled service oriented architecture with bounded contexts

Page 57: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

A Microservice Definition !

Loosely coupled service oriented architecture with bounded contexts

If every service has to be updated at the same time it’s not loosely coupled

Page 58: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

A Microservice Definition !

Loosely coupled service oriented architecture with bounded contexts

If every service has to be updated at the same time it’s not loosely coupled

If you have to know too much about surrounding services you don’t have a bounded context. See the Domain Driven Design book by Eric Evans.

Page 59: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Coupling Concerns

http://en.wikipedia.org/wiki/Conway's_law

●Conway’s Law - organizational coupling

●Centralized Database Schemas

●Enterprise Service Bus - centralized message queues

●Inflexible Protocol Versioning

Page 60: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Non-Destructive Production Updates

● “Immutable Code” Service Pattern

● Existing services are unchanged, old code remains in service

● New code deploys as a new service group

● No impact to production until traffic routing changes

● A|B Tests, Feature Flags and Version Routing control traffic

● First users in the test cell are the developer and test engineers

● A cohort of users is added looking for measurable improvement

● Finally make default for everyone, keeping old code for a while

Page 61: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Speeding Up The Platform

Datacenter Snowflakes • Deploy in months • Live for years

Page 62: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Speeding Up The Platform

Datacenter Snowflakes • Deploy in months • Live for years

Virtualized and Cloud • Deploy in minutes • Live for weeks

Page 63: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Speeding Up The Platform

Datacenter Snowflakes • Deploy in months • Live for years

Virtualized and Cloud • Deploy in minutes • Live for weeks

Docker Containers • Deploy in seconds • Live for minutes/hours

Page 64: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Speeding Up The Platform

Datacenter Snowflakes • Deploy in months • Live for years

Virtualized and Cloud • Deploy in minutes • Live for weeks

Docker Containers • Deploy in seconds • Live for minutes/hours

AWS Lambda • Deploy in milliseconds • Live for seconds

Page 65: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Speeding Up The Platform

Speed enables and encourages new microservice architectures

Datacenter Snowflakes • Deploy in months • Live for years

Virtualized and Cloud • Deploy in minutes • Live for weeks

Docker Containers • Deploy in seconds • Live for minutes/hours

AWS Lambda • Deploy in milliseconds • Live for seconds

Page 66: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

With AWS Lambda compute resources are charged

by the 100ms, not the hour

First 1M node.js executions/month are free

Page 67: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Inspiration

Page 68: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

http://www.infoq.com/presentations/scale-gilt

http://www.slideshare.net/mcculloughsean/itier-breaking-up-the-monolith-philly-ete

http://www.infoq.com/presentations/Twitter-Timeline-Scalability http://www.infoq.com/presentations/twitter-soa

http://www.infoq.com/presentations/Zipkin

https://speakerdeck.com/mattheath/scaling-micro-services-in-go-highload-plus-plus-2014

State of the Art in Web Scale Microservice Architectures

AWS Re:Invent : Asgard to Zuul https://www.youtube.com/watch?v=p7ysHhs5hl0 Resiliency at Massive Scale https://www.youtube.com/watch?v=ZfYJHtVL1_w

Microservice Architecture https://www.youtube.com/watch?v=CriDUYtfrjs

Page 69: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Microservice Concerns

ConfigurationTooling Discovery Routing Observability

Development: Languages and Container

Operational: Orchestration and Deployment Infrastructure

Datastores

Page 70: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Microservices

Edda Archaius !

Configuration

Asgard Aminator !Tooling

Eureka Prana !

Discovery

Denominator Zuul, Netty Ribbon 2.0 !

Routing

Hystrix Pytheus SALP !

Observability

Java, Groovy, Scala, Clojure, Python, Node.js with AMI and Docker Containers

Manual Orchestration with Asgard and deployment on AWS or Eucalyptus

Ephemeral datastores using Dynomite, Memcached, Astyanax, Staash, Priam, Cassandra

Page 71: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Microservices

Edda Archaius !

Configuration

Asgard Aminator !Tooling

Eureka Prana !

Discovery

Denominator Zuul, Netty Ribbon 2.0 !

Routing

Hystrix Pytheus SALP !

Observability

Java, Groovy, Scala, Clojure, Python, Node.js with AMI and Docker Containers

Manual Orchestration with Asgard and deployment on AWS or Eucalyptus

Ephemeral datastores using Dynomite, Memcached, Astyanax, Staash, Priam, Cassandra

Focus on global distribution, high scale and availability

Page 72: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing
Page 73: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing
Page 74: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Twitter Microservices

Decider !!ConfigurationTooling

Finagle Zookeeper !Discovery

Finagle Netty !

Routing

Zipkin !!Observability

Scala with JVM Container

Orchestration using Aurora deployment in datacenters using Mesos

Custom Cassandra-like datastore: Manhattan

Page 75: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Twitter Microservices

Decider !!ConfigurationTooling

Finagle Zookeeper !Discovery

Finagle Netty !

Routing

Zipkin !!Observability

Scala with JVM Container

Orchestration using Aurora deployment in datacenters using Mesos

Custom Cassandra-like datastore: Manhattan

Focus on efficient datacenter deployment at scale

Page 76: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing
Page 77: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing
Page 78: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Gilt Microservices

Decider !!Configuration

Ion Cannon SBT Rake !

Tooling

Finagle Zookeeper !Discovery

Akka Finagle Netty !

Routing

Zipkin !!Observability

Scala and Ruby with Docker Containers

Deployment on AWS

Datastores per Microservice using MongoDB, Postgres, Voldemort

Page 79: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Gilt Microservices

Decider !!Configuration

Ion Cannon SBT Rake !

Tooling

Finagle Zookeeper !Discovery

Akka Finagle Netty !

Routing

Zipkin !!Observability

Scala and Ruby with Docker Containers

Deployment on AWS

Datastores per Microservice using MongoDB, Postgres, Voldemort

Focus on fast development with Scala and Docker

Page 80: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing
Page 81: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Hailo Microservices

Configuration

Hubot Janky

Jenkins !Tooling

go-platform !Discovery

go-platform RabbitMQ !Routing

Request trace !Observability

Go using Docker

Deployment on AWS

Datastore based on Cassandra

Page 82: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Hailo Microservices

Configuration

Hubot Janky

Jenkins !Tooling

go-platform !Discovery

go-platform RabbitMQ !Routing

Request trace !Observability

Go using Docker

Deployment on AWS

Datastore based on Cassandra

Focus on fast development at scale using Go

Page 83: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing
Page 84: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Node.js Microservices

Several different approaches !Mostly small simple microservices !Focus on easy interface with presentation code in javascript !AWS Lambda - preview only

http://senecajs.org/

http://aws.amazon.com/lambda/

Page 85: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Adrian’s Tinkering Projects

Model and visualize microservices Simulate interesting architectures Generate large scale configurations Eventually stress test real tools !See github.com/adrianco/spigo Simulate Protocol Interactions in Go Visualize with D3

ELB Load Balancer

Zuul API Proxy

Karyon Business Logic

Staash Data Access Layer

Priam Cassandra Datastore

Three Availability Zones

Page 86: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

What is Spigo?

Creates and animates microservices Single Go program on this laptop Generates 100,000+ instances About 250,000 messages/sec Uses Go channels rather than http Supports social network architecture Supports NetflixOSS architecture Simple code patterns to extend

Page 87: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Why Build Spigo?

Generate test microservice configurations at scale Stress monitoring tools display capabilities !Eventually (i.e. not implemented yet) Dynamically vary configuration: autoscale, code push Simulate microservice, zone, region failures D3 websocket dynamic browser interface Timescale: Monitorama Conference June 2015

Page 88: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Spigo Nanoservice Structurefunc Start(listener chan gotocol.Message) { ... for { select { case msg := <-listener: switch msg.Imposition { case gotocol.Hello: ... case gotocol.NameDrop: ... case gotocol.Chat: ... case gotocol.GetResponse: ... case gotocol.Goodbye: gotocol.Message{gotocol.Goodbye, nil, time.Now(), name}.GoSend(netflixoss) return } case <-chatTicker.C: ... } } }

Page 89: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

What’s Next?

Page 90: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Web Scale Characteristics

●Brand new Microservices are deployed infrequently

●New versions deployed automatically/frequently

●No real need for general purpose orchestration

●Architectures use hundreds of microservices

●Each deployment is heavily customized

Page 91: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Orchestration for Applications

●Standard portable microservice based applications

●New versions deployed automatically/frequently

●Orchestration automated and standardized

●Architectures likely based on tens of microservices

●Opportunity: Docker Hub as the enterprise app store

Page 92: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Next Generation Applications

? !Configuration

Docker? PaaS? !Tooling

Eureka? Consul? !

Discovery

Ribbon?Finagle? !Routing

Zipkin? Metrics? Hystrix? !

Observability

Development: Components assembled from Docker Hub as a composable “app store”

Operational: Many orchestration choices across public and private clouds

Datastores: Distributed Ephemeral, Orchestrated or DBaaS

Page 93: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Next Generation Applications

? !Configuration

Docker? PaaS? !Tooling

Eureka? Consul? !

Discovery

Ribbon?Finagle? !Routing

Zipkin? Metrics? Hystrix? !

Observability

Development: Components assembled from Docker Hub as a composable “app store”

Operational: Many orchestration choices across public and private clouds

Datastores: Distributed Ephemeral, Orchestrated or DBaaS

Fill in the gaps, rapidly evolving ecosystem choices

Page 94: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Forward Thinking

Page 95: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Forward Thinking

Page 96: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Forward Thinking

Page 97: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Forward Thinking

http://eugenedvorkin.com/seven-micro-services-architecture-advantages/

Page 98: State of the Art in Microservices - microXchg › 2015 › slides › 01_08_AdrianCockcroftSlides.pdf · Non-Destructive Production Updates “Immutable Code” Service Pattern Existing

Any Questions?

Disclosure: some of the companies mentioned may be Battery Ventures Portfolio Companies See www.battery.com for a list of portfolio investments

● Battery Ventures http://www.battery.com ● Adrian’s Tweets @adrianco and Blog http://perfcap.blogspot.com ● Slideshare http://slideshare.com/adriancockcroft !

● Monitorama Opening Keynote Portland OR - May 7th, 2014 ● GOTO Chicago Opening Keynote May 20th, 2014 ● Qcon New York – Speed and Scale - June 11th, 2014 ● Structure - Cloud Trends - San Francisco - June 19th, 2014 ● GOTO Copenhagen/Aarhus – Fast Delivery - Denmark – Sept 25th, 2014 ● DevOps Enterprise Summit - San Francisco - Oct 21-23rd, 2014 #DOES14 ● GOTO Berlin - Migrating to Microservices - Germany - Nov 6th, 2014 ● AWS Re:Invent - Cloud Native Cost Optimization - Las Vegas - November 14th, 2014 ● O’Reilly Software Architecture Conference - Fast Delivery - Boston March 16th 2015