monoliths, myths, and microservices

33
@mfdii Monoliths, Myths, and Microservices Michael Ducy - Chef @mfdii

Upload: michael-ducy

Post on 15-Apr-2017

65 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Monoliths, Myths, and Microservices

@mfdii

Monoliths, Myths, and Microservices

Michael Ducy - Chef@mfdii

Page 2: Monoliths, Myths, and Microservices

@mfdii@mfdii

A quick refresher

• Let’s define microservices:

The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.

http://www.martinfowler.com/articles/microservices.html

Page 3: Monoliths, Myths, and Microservices

@mfdii

Page 4: Monoliths, Myths, and Microservices

@mfdiihttp://www.martinfowler.com/articles/microservices.html

Page 5: Monoliths, Myths, and Microservices

@mfdii@mfdii

I did that in 2005, yawn

Page 6: Monoliths, Myths, and Microservices

@mfdii@mfdii

Stop, It’s not SOA

• Services tend to have smaller concerns than SOA Services• Architectural Concepts incorporates Innovations:

– In Infrastructure– In Automation– In Continuous Delivery– In Development– In Monitoring

http://www.martinfowler.com/articles/microservices.html

Page 7: Monoliths, Myths, and Microservices

@mfdii

Myth #1: MicroServices Only Need Apply

Page 8: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #1: Microservices Only Need Apply

“Microservices is the only architectural pattern we need”

• Microservices introduces complexity in operations– Pay down the complexity first?– Pay it down later (technical debt)

• What if your idea doesn’t work?• What if your project is scrapped?

Page 9: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #1: Microservices Only Need Apply

• Be Lean in your thinking• Often faster to start developing in a non microservices architecture

– Componentize your application– Split later

• You don’t have a scaling problem, yet– But you might later, then look at microservices

Page 10: Monoliths, Myths, and Microservices

@mfdii

Myth #2: Everything’s solved by containers and microservices

Page 11: Monoliths, Myths, and Microservices

@mfdiihttp://www.martinfowler.com/articles/microservices.html

Page 12: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #2: Everything’s solved by containers and microservices

• Containers fit very well with the microservices model– Serverless might fit even better!

• Great for your Application Logic• Stateless!

Page 13: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #2: Everything’s solved by containers and microservices

http://www.martinfowler.com/articles/microservices.html

Page 14: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #2: Everything’s solved by containers and microservices

Page 15: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #2: Everything’s solved by containers and microservices

• Great for your Application Logic• Not (always) great for your data• Data tier needs to be managed

– VMs, Config Management– StatefulSets (Kubernetes)– Mesosphere (more than Containers)– Cloud Services

• Data tier need to be “Self Service”– Like AWS RDS, etc

Page 16: Monoliths, Myths, and Microservices

@mfdii

Myth #3: Anyone can do Microservices

Page 17: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #3: Anyone can do Microservices

• Anyone except your organization• Have you adopted:

– Continuous Integration?– Continuous Delivery?– Infrastructure As Code?– Modern Monitoring and log aggregation?– Cloud?– Fiction-less Change Management?

Page 18: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #3: Anyone can do Microservices

• Microservices won’t fix:– Your broken culture– Your lack of modernization– Your broken process– Your ineffective org chart

Page 19: Monoliths, Myths, and Microservices

@mfdii@mfdii

Because Conway’s Law

http://www.martinfowler.com/articles/microservices.html

Page 20: Monoliths, Myths, and Microservices

@mfdii@mfdii

Because Conway’s Law

http://www.martinfowler.com/articles/microservices.html

Page 21: Monoliths, Myths, and Microservices

@mfdii

Myth #4: I shouldn’t do microservices

Page 22: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #4: I shouldn’t do microservices

Page 23: Monoliths, Myths, and Microservices

@mfdii@mfdii

Myth #4: I shouldn’t do microservices

• What got you here won’t get you there.• Forcing function to modernize

– Continuous Integration– Continuous Delivery– Infrastructure As Code and Automation– Modern Monitoring and log aggregation– Cloud– Fiction-less Change Management

Page 24: Monoliths, Myths, and Microservices

@mfdii@mfdii

Enter...Habitat

Page 25: Monoliths, Myths, and Microservices

@mfdii

HabitatApplication automation that enables modern application teams to build, deploy, and manage any application in any environment - from traditional data-centers to containerized microservices.

Page 26: Monoliths, Myths, and Microservices

@mfdii

Page 27: Monoliths, Myths, and Microservices

@mfdii@mfdii

Guiding Microservices Principles

• Componentization via Services• Intelligence in the end point• Decentralization• Automated deployments

Page 28: Monoliths, Myths, and Microservices

@mfdii

Habitat’s Approach

• Applications: portable & responsible for their own automation• Small OS serves the application • Make application components aware of each other over a network• Continuous deployment without traditional “ARA”

The solution should be the same:• For new and legacy applications.• No matter the runtime environment

Page 29: Monoliths, Myths, and Microservices

@mfdii

How we do itPackaging Applications

Plan Artifact Depot

Bare Metal

Containers

AMI

VM

Depot Artifact

Running ApplicationsServiceSupervisor

ServiceSupervisor

ServiceSupervisor

ServiceSupervisor

Page 30: Monoliths, Myths, and Microservices

@mfdii

How we do it

Service Service

Service Service

Leader

Initializer

Stand Alone

Supervisor

Supervisor

Supervisor

Supervisor

Supervisor

Supervisor

Topologies Update Strategy

Artifact Depot

ServiceSupervisor

“All At Once”

Running Applications

Page 31: Monoliths, Myths, and Microservices

@mfdii

How we do itSecurity

Secret Payloads

Service Service

Service Service

Pub Key

Symmetric Encryption

Service Service

Service Service

Load Balancer

Build Service

Plan Artifact DepotBuildService

Page 32: Monoliths, Myths, and Microservices

@mfdii

Demo!

Page 33: Monoliths, Myths, and Microservices

@mfdii

Come contribute!

• Write a plan for an application https://github.com/habitat-sh/core-plans

• Contribute to Habitat https://github.com/habitat-sh/habitat

• Docs https://www.habitat.sh/docs/overview/

• Tutorial https://www.habitat.sh/tutorials/

• Tweet at me: @mfdii