monoliths, myths, and microservices
TRANSCRIPT
@mfdii
Monoliths, Myths, and Microservices
Michael Ducy - Chef@mfdii
@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
@mfdii
@mfdiihttp://www.martinfowler.com/articles/microservices.html
@mfdii@mfdii
I did that in 2005, yawn
@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
@mfdii
Myth #1: MicroServices Only Need Apply
@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?
@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
@mfdii
Myth #2: Everything’s solved by containers and microservices
@mfdiihttp://www.martinfowler.com/articles/microservices.html
@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!
@mfdii@mfdii
Myth #2: Everything’s solved by containers and microservices
http://www.martinfowler.com/articles/microservices.html
@mfdii@mfdii
Myth #2: Everything’s solved by containers 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
@mfdii
Myth #3: Anyone can do 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?
@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
@mfdii@mfdii
Because Conway’s Law
http://www.martinfowler.com/articles/microservices.html
@mfdii@mfdii
Because Conway’s Law
http://www.martinfowler.com/articles/microservices.html
@mfdii
Myth #4: I shouldn’t do microservices
@mfdii@mfdii
Myth #4: I shouldn’t do 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
@mfdii@mfdii
Enter...Habitat
@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.
@mfdii
@mfdii@mfdii
Guiding Microservices Principles
• Componentization via Services• Intelligence in the end point• Decentralization• Automated deployments
@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
@mfdii
How we do itPackaging Applications
Plan Artifact Depot
Bare Metal
Containers
AMI
VM
Depot Artifact
Running ApplicationsServiceSupervisor
ServiceSupervisor
ServiceSupervisor
ServiceSupervisor
@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
@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
@mfdii
Demo!
@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