Microservices + DevOps
Charlie Garrod Michael Hilton
School of
Computer Science
15-214 1
Administrivia
• Homework 6 checkpoint – Monday Dec 4th
• Final Exam Review: Dec 13th, 2-4pm Wean 5409
• Final Exam: Dec 15th, 5:30-8:30pm Wean 7500
15-214 2
Last Time:
• Architectural styles
15-214 3
Simple Layers App
15-214 4
More functionality
15-214 5
Even more functionality
15-214 6
Organize our backend
15-214 7
How to scale?
15-214 8
Monolith
• What happens when we need 100
servers?
• What if we don’t use all modules
equally?
• How can we update individual
models?
• Do all modules need to use the
same DB, language, runtime, etc?
15-214 9
Microservices
15-214 10
Microservices should be:
• Modelled around business domain
• Culture of automation
• Hide implementation details
• Decentralized governance
• Deploy independently
• Design for failure
• Highly observable
15-214 11
Microservice prerequisites
• Rapid Provisioning
• Basic Monitoring
• Rapid Application Deployment
• Devops Culture
15-214 12
15-214 13
Why are microservices such a big deal?
15-214 14
Impact on development practices
• Amazon transitioned to “two-pizza” teams
• “Full Stack” developers
• ”Devops” as a prereq
• Live testing and rollback
• Migrating from “monolith to microservices” is popular, but
comes at a cost
15-214 15
Microservices benefits
• Strong Module Boundaries
• Independent Deployment
• Technology Diversity
15-214 16
Microservices overhead
15-214 17
Microservice costs
• Distribution
• Eventual Consistency
• Operational complexity
15-214 18
Discussion of Microservices
• Are they really “new”?
• Do microservices solve problems, or push them down the line?
• What are the impacts of the added flexibility?
• Good Architecture doesn’t fix poor low level design problems
• Beware “cargo cult”
• “If you can’t build a well-structured monolith, what makes you
think microservices is the answer?” – Simon Brown
• Leads to more API design decisions
15-214 19
Microservice prerequisites
• Rapid Provisioning
• Basic Monitoring
• Rapid Application Deployment
• Devops Culture
15-214 20
DEVOPS
15-214 21
Why DevOps?
• Developers and Operations don’t have the same goals
– Devs want to push new features
– Ops wants to keep the system available (stable, tested, etc.)s
• Poor communication between Dev and Ops
• Limited capacity of operations staff
• Want to reduce time to market for new features
• Reduce “Throw it over the fence” syndrome
15-214 22
DevOps Definition
• “DevOps is a set of practices intended
to reduce the time between committing
a change to a system and the change
being placed into normal production,
while ensuring high quality.”
15-214 23
What are implications of DevOps?
• Quality of the code must be high
– Testing
• Quality of the build & delivery mechanism must be high
– Automation & more testing
• Time is split:
– From commit to deployment to production
– From deployment to acceptance into normal production
• Goal-oriented definition
– May use agile methods, continuous deployment (CD), etc.
– Likely to use tools
• Achieving it starts before committing
15-214 24
Microservices rely on DevOps
15-214 25
DevOps Toolchain
15-214 26
DevOps Toolchain
• Code — code development and review, source code
management tools, code merging
• Build — continuous integration tools, build status
• Test — continuous testing tools that provide feedback on
business risks
• Package — artifact repository, application pre-deployment
staging
15-214 27
DevOps Toolchain continued
• Release — change management, release approvals, release
automation
• Configure — infrastructure configuration and
management, Infrastructure as Code tools
• Monitor — applications performance monitoring, end–user
experience
15-214 28
DevOps Toolchain - Code
• Code development and review
• Source code management tools
• Code merging
15-214 29
DevOps Toolchain - Code
• Code development and review
• Source code management tools
• Code merging
More on Code Review in 17-313
15-214 30
DevOps Toolchain - Code
• Code development and review
• Source code management tools
• Code merging
15-214 31
DevOps Toolchain - Code
• Code development and review
• Source code management tools
• Code merging
15-214 32
DevOps Toolchain - Build
• Continuous integration tools
• Build status
15-214 33
DevOps Toolchain - Test
• Continuous testing tools that provide feedback on business risks
15-214 34
DevOps Toolchain - Test
• Continuous testing tools that provide feedback on business risks
Testing tools must
have tests to be
valuable!!
15-214 35