SlideShare a Scribd company logo
Surviving In A Microservices
Environment
Steve Pember
Principal Engineer @ Toast
Software Architecture Conf, San Jose, 2019
@svpember
@svpember
Microservice Blog Posts & Presentations
SACon 2019 - Surviving in a Microservices Environment
<3
SACon 2019 - Surviving in a Microservices Environment
What Are Microservices?
SACon 2019 - Surviving in a Microservices Environment
@svpember
Why Choose Microservices?
• Reduce Coupling!
• Team Autonomy
• Forced Boundaries between Functional Areas
• Right Tool for the Job
• Continuous Delivery
• Smaller codebases are easier to reason about
• Easy to replace old services
• Efficient Scaling
• Can move quickly (once you’re up and running)
SACon 2019 - Surviving in a Microservices Environment
SACon 2019 - Surviving in a Microservices Environment
Help?
This talk is not a Good Talk.
Please let me know if I missed
anything
@svpember
Topics
• Is it time for Microservices?
• Infrastructure / Operations
• Architecture
• Developer Productivity / Happiness
• People Communication
• Breaking off from the Monolith
• Random
@svpember
Topics
• Is it time for Microservices?
@svpember
Is it time for Microservices?
• … is it?
SACon 2019 - Surviving in a Microservices Environment
Not before 8 Engineers.
After You have known
Defined Functional Areas.
SACon 2019 - Surviving in a Microservices Environment
You may not be ready, and
that’s OK.
@svpember
Topics
• Is it time for Microservices?
• Infrastructure / Operations
One Microservice is Easy
One Microservice Platform is
HARD
@svpember
Infrastructure / Operations
• Do we have Centralized Logging?
Centralized Log Aggregation is
Critical to Success
@svpember
@svpember
@svpember
Infrastructure / Operations
• Do we have Centralized Logging?
• What do we use for Metrics?
SACon 2019 - Surviving in a Microservices Environment
@svpember
SACon 2019 - Surviving in a Microservices Environment
Your Infrastructure needs to
Scale along with your Platform
Your Infrastructure needs to
Scale along with your Platform
@svpember
–Johnny Appleseed
“Type a quote here.”
@svpember
Infrastructure / Operations
• Do we have Centralized Logging?
• What do we use for Metrics?
• How are our builds performed?
@svpember
Infrastructure / Operations
• Do we have Centralized Logging?
• What do we use for Metrics?
• How are our builds performed?
• When are our builds performed?
Continuous Integration!
Frequent merging provides fast
feedback. Faster Iterations.
CI should be run on each ‘main’
branch and PR commit
CI should produce some
correct Artifact
@svpember
@svpember
@svpember
Infrastructure / Operations
• Do we have Centralized Logging?
• What do we use for Metrics?
• How are our builds performed?
• When are our builds performed?
• Can our CI keep up with the the team’s build demand?
@svpember
@svpember
@svpember
Infrastructure / Operations
• Do we have Centralized Logging?
• What do we use for Metrics?
• How are our builds performed?
• When are our builds performed?
• Can our CI keep up with the the team’s build demand?
• Do we have any coding conventions or quality gates?
@svpember
@svpember
@svpember
Infrastructure / Operations
• Do we have Centralized Logging?
• What do we use for Metrics?
• How are our builds performed?
• When are our builds performed?
• Can our CI keep up with the the team’s build demand?
• Do we have any coding conventions or quality gates?
• How are our services deployed?
Continuous Deployment is your
Ultimate Goal
SACon 2019 - Surviving in a Microservices Environment
A Certain level of
Operational-Readiness is
required
@svpember
@svpember
@svpember
Service Mesh
• Likely don’t need in a small org with few services / Essential as you grow
• Aids in resiliency, can reroute traffic around failing nodes
• App Devs focus on building services vs wiring them up
• Sidecars can handle metric, log collection and auth between services
• Easy Canary Deploys
@svpember
Infrastructure / Operations
• Do we have Centralized Logging?
• What do we use for Metrics?
• How are our builds performed?
• When are our builds performed?
• Can our CI keep up with the the team’s build demand?
• Do we have any coding conventions or quality gates?
• How are our services deployed?
• Do we have multiple environments? How are our environments
managed?
@svpember
Goal: standup a new
environment with a
single command
@svpember
Topics
• Is it time for Microservices?
• Infrastructure / Operations
• Architecture
@svpember
Architecture
• Do we have an overall design vision?
SACon 2019 - Surviving in a Microservices Environment
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use? How much freedom do we have in
choosing them?
Right Tool for the Job!
@svpember
Be wary of new adopting new
technology
Boring is Good
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use? How much freedom do we have in choosing
them?
• How do we share code between services?
SACon 2019 - Surviving in a Microservices Environment
Shared Code can increase
coupling and decrease
Autonomy
@svpember
Shared code?
• Internal Commons (e.g. a custom String Utils) - OK!
• Styling, CSS - Go for it!
• Business Logic - You’re gonna have a bad time
• Domain Objects - Never!
@svpember
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use? How much freedom do we have in choosing
them?
• How do we share code between services?
• How do we test an individual service?
Integration tests are the best tests
SACon 2019 - Surviving in a Microservices Environment
@svpember
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use? How much freedom do we have in choosing
them?
• How do we share code between services?
• How do we test an individual service?
• How do we test the platform as a whole?
@svpember
End-to-End tests are Difficult
1. Reset fixture / default state data on each service’s datastore
2. Execute test by performing some user action at the edge
3. Wait for test to complete
4. Make assertions on each service (e.g. look out for unknown side effects)
5. Repeat
Consider… Not doing that.
@svpember
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use? How much freedom do we have in choosing
them?
• How do we share code between services?
• How do we test an individual service?
• How do we test the platform as a whole?
• Overall architectural style for services?
Are there common, repeatable,
patterns?
Does everyone in the org
know?
SACon 2019 - Surviving in a Microservices Environment
Asynchronous, Event Driven
Communications
+
Domain Driven Design
1) Async Comms
SACon 2019 - Surviving in a Microservices Environment
Services that communicate
Synchronously are a
Distributed Monolith
@svpember
@svpember
Embrace Eventual Consistency
SACon 2019 - Surviving in a Microservices Environment
@svpember
@svpember
Decoupled Services allow for
team Autonomy
Decoupled Services scale
easily and efficiently
@svpember
@svpember
–Johnny Appleseed
“Type a quote here.”
Source: https://dzone.com/articles/distributed-sagas-for-microservices
2) Domain Driven Design
Please
Read =>
And also
=>
@svpember
Some DDD concepts
• Ubiquitous Language
• Entities
• Aggregates
• Bounded Contexts
• No Direct communications across Boundaries, communicate through some
single point of contact
SACon 2019 - Surviving in a Microservices Environment
@svpember
One Last Thing: Always have a
way to recover
@svpember
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use? How much freedom do we have in choosing
them?
• How do we share code between services?
• How do we test an individual service?
• How do we test the platform as a whole?
• Overall architectural style for services?
• When do we decide to create new services?
@svpember
New Service?
• Don’t make services ‘just because’
• Don’t make CRUD services
• Look for places where Eventual Consistency is acceptable
• A service should be thought as wrapping some functional business logic, not
the domain objects inside of it
• When new functionality is proposed: does it fall within the responsibilities of an
existing service?
# of services < # of developers
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use? How much freedom do we have in choosing
them?
• How do we share code between services?
• How do we test an individual service?
• How do we test the platform as a whole?
• Overall architectural style for a service?
• When do we decide to create new services?
• How do we bootstrap a new service?
An Event Log makes this trivial
@svpember
Topics
• Is it time for Microservices?
• Infrastructure / Operations
• Architecture
• Developer Productivity / Happiness
@svpember
Developer Productivity / Happiness
• Do we have a service template?
git clone git@github.com:
your_org/services-template.git
@svpember
Developer Productivity / Happiness
• Do we have a service template?
• What does it take to run our services?
What’s our Developer
experience like?
Running the Monolith on your
laptop will eventually become
problematic
Running a single Microservice
is easy.
Running all of them is
impossible.
@svpember
Developing against other Services
1. Every team publishes a mock service along with the real service
2. Only run services you need at the time
3. On-demand Environments
4. Keep buying bigger laptops
@svpember
@svpember
Developer Productivity / Happiness
• Do we have a service template?
• What does it take to run our services?
• Do our Engineers know how our services are deployed?
Let App Devs App Dev
@svpember
Developer Productivity / Happiness
• Do we have a service template?
• What does it take to run our services?
• Do our Engineers know how our services are deployed?
• How do our Engineers know about other Services?
@svpember
Topics
• Is it time for Microservices?
• Infrastructure / Operations
• Architecture
• Developer Productivity / Happiness
• People Communication
Conway’s Law is Real
People are the reason for
Microservices
SACon 2019 - Surviving in a Microservices Environment
SACon 2019 - Surviving in a Microservices Environment
@svpember
People Communication
• How large are our teams?
@svpember
@svpember
@svpember
@svpember
Team larger than 4?
Break them up
@svpember
@svpember
People Communication
• How large are our teams?
• How are they structured?
@svpember
People Communication
• How large are our teams?
• How are they structured?
• Are there clear functional boundaries between teams?
SACon 2019 - Surviving in a Microservices Environment
@svpember
People Communication
• How large are our teams?
• How are they structured?
• Are there clear functional boundaries between teams?
• Do we encourage cross-team socializing?
SACon 2019 - Surviving in a Microservices Environment
@svpember
People Communication
• How large are our teams?
• How are they structured?
• Are there clear functional boundaries between teams?
• Do we encourage cross-team socializing?
• Do we have clear methods for engineers to share & publicize services
they’ve built?
@svpember
People Communication
• How large are our teams?
• How are they structured?
• Are there clear functional boundaries between teams?
• Do we encourage cross-team socializing?
• Do we have clear methods for engineers to share & publicize services they’ve
built?
• Do we add more process if something goes wrong?
Process is like Scar Tissue
@svpember
People Communication
• How large are our teams?
• How are they structured?
• Are there clear functional boundaries between teams?
• Do we encourage cross-team socializing?
• Do we have clear methods for engineers to share & publicize services they’ve
built?
• Do we add more process if something goes wrong?
• Do we have company ‘Core Values’? Do they include non-technical
skills?
Empathy should be your #1
Core Value
SACon 2019 - Surviving in a Microservices Environment
@svpember
Topics
• Is it time for Microservices?
• Infrastructure / Operations
• Architecture
• Developer Productivity / Happiness
• People Communication
• Breaking off from the Monolith
@svpember
Breaking off from the Monolith
• Do we have a process / guideline for breaking functionality out of the
monolith?
@svpember
Breaking off from the Monolith
• Do we have a process / guideline for breaking functionality out of the monolith?
• Do we have a process / guideline for new services to interact w/ the
monolith?
@svpember
Breaking off from the Monolith
• Do we have a process / guideline for breaking functionality out of the monolith?
• Do we have a process / guideline for new services to interact w/ the monolith?
• So… how much functionality have we actually split off?
@svpember
Breaking off from the Monolith
• Do we have a process / guideline for breaking functionality out of the monolith?
• Do we have a process / guideline for new services to interact w/ the monolith?
• So… how much functionality have we actually split off?
• How’s the monolith doing?
All of your dependent systems
need to scale to meet the
demands of your services
@svpember
@svpember
Slicing code from the Monolith
• Not that straightforward!
• Create programmatic boundaries around the departing code
• Measure traffic and operational load across those boundaries
• Any dependencies on original system?
• Has the monolith accounted for the backpressure from the new service?
• Roll out slowly
• How are the metrics looking?
The First Service will be HARD
Beware Being the First
@svpember
Topics
• Is it time for Microservices?
• Infrastructure / Operations
• Architecture
• Developer Productivity / Happiness
• People Communication
• Breaking off from the Monolith
• Random
@svpember
Random Advice
• API & Message versioning is a real issue
@svpember
Random Advice
• API & Message versioning is a real issue
• Always have more than one cluster
@svpember
Random Advice
• API & Message versioning is a real issue
• Always have more than one cluster
• Don’t get cute with the naming of services
Any idea
what these
do?
@svpember
Random Advice
• API & Message versioning is a real issue
• Always have more than one cluster
• Don’t get cute with the naming of services
• New Feature? Walk backwards from the End User UI
Be Customer Focused
@svpember
Random Advice
• API & Message versioning is a real issue
• Always have more than one cluster
• Don’t get cute with the naming of services
• New Feature? Walk backwards from the End User UI
• Release when a feature is ready, don’t be afraid of bugs
@svpember
Random Advice
• API & Message versioning is a real issue
• Always have more than one cluster
• Don’t get cute with the naming of services
• New Feature? Walk backwards from the End User UI
• Release when a feature is ready, don’t be afraid of bugs
• But don’t release Friday afternoon.
To Summarize:
Microservices are hard because
of Infrastructure and People
Thank you!
@svpember
@svpember
Images
• Factory Workers: https://www.stallardkaneassociates.com/hr-employment-law/factory-workers/
• Bad Demolition: https://media.giphy.com/media/zf3skxc4BFBqo/giphy.mp4
• Tom Hanks, Desert: http://www.trbimg.com/img-57ba8bc0/turbine/sdut-lost-in-the-desert-waiting-for-the-king-2016apr21
• Say Anything / John Cusak: http://www.glamour.com/story/happy-birthday-john-cusack-and
• Wilderness Survival Guide: https://www.kobo.com/us/en/ebook/the-wilderness-survival-guide-1
• XKCD: Code Review: https://xkcd.com/1513/
• Monolithic vs Microservices: @alvaro_sanchez
• Drago (break you): https://giphy.com/gifs/GWD5nSpiHxs3K
• Michael Jackson, Bad: https://www.imdb.com/title/tt0124288/mediaviewer/rm4118942720
• Rocky Stairs: http://pixgood.com/rocky-stairs.html
• Assembly Line: http://www.solidsmack.com/culture/humans-need-apply-new-short-film-explores-future-robots-manufacturing-automation/
• Site Reliability Engineer Shirt: https://www.sunfrog.com/102539321-160396457.html
• Watson, “Wait”: https://giphy.com/gifs/B8qMV3f7PH7nq
• Service Mesh: https://www.redhat.com/en/topics/microservices/what-is-a-service-mesh
• Trick question: https://media.giphy.com/media/ZcaSXPd7di8O4ZfsnH/giphy.mp4
• Dumpster fire: https://sentinelksmo.org/lawmakers-spark-dumpster-fire-with-tax-school-funding-bill/shutterstock_49161094/
• Work meeting: https://pxhere.com/en/photo/910324
• People in Conversation: https://preply.com/en/blog/2018/07/06/5-main-principles-of-small-talk/
• Indiana Jones: https://giphy.com/explore/indiana-jones-and-the-raiders-of-the-lost-ark
• Simpsons Mob: https://www.bobleesays.com/2017/06/18/halt-angry-fan-mob/
• Picard: https://fanfilmfactor.com/2019/03/07/the-right-captain-at-the-right-time-why-we-like-pike-discovery-editorial/
• Megaphone: https://imgflip.com/i/332n0j
@svpember
Links
• Eric Evans: DDD and Microservices: https://www.youtube.com/watch?
v=yPvef9R3k-M
•

More Related Content

PDF
Surviving in a microservices environment
PDF
Surviving in a Microservices environment -abridged
PDF
Greach 2018: Surviving Microservices
PDF
6 reasons Jubilee could be a Rubyist's new best friend
PPTX
Serverless Toronto helps Startups
PPTX
Scalable game-servers-tgc
PDF
Debugging microservices in production
PDF
Deployment is the new build
Surviving in a microservices environment
Surviving in a Microservices environment -abridged
Greach 2018: Surviving Microservices
6 reasons Jubilee could be a Rubyist's new best friend
Serverless Toronto helps Startups
Scalable game-servers-tgc
Debugging microservices in production
Deployment is the new build

Similar to SACon 2019 - Surviving in a Microservices Environment (20)

PDF
Surviving in a Microservices Environment
PDF
QCon 2015 - Microservices Track Notes
PDF
Microservices - Scaling Development and Service
PDF
Full stack conference talk slides
PPTX
Evolving Architecture and Organization - Lessons from Google and eBay
PPTX
How do we drive tech changes
PDF
DevOps in the Real World
PDF
Enabling your DevOps culture with AWS-webinar
PDF
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
PDF
CMS Crash Course!
PPTX
Emperors new clothes_jab
PPTX
Microservices music city code v2
PPTX
Making sense of microservices, service mesh, and serverless
PPTX
Engage 2018 - What About the Apps? A Domino Modernisation Story
PDF
Domain Driven Design Big Picture Strategic Patterns
PDF
Ten Advices for Architects
PPTX
Microsoft Teams More Than Just Chat
PDF
10 Hinweise für Architekten
PDF
cloud session uklug
PPTX
Technical stories v1.2
Surviving in a Microservices Environment
QCon 2015 - Microservices Track Notes
Microservices - Scaling Development and Service
Full stack conference talk slides
Evolving Architecture and Organization - Lessons from Google and eBay
How do we drive tech changes
DevOps in the Real World
Enabling your DevOps culture with AWS-webinar
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
CMS Crash Course!
Emperors new clothes_jab
Microservices music city code v2
Making sense of microservices, service mesh, and serverless
Engage 2018 - What About the Apps? A Domino Modernisation Story
Domain Driven Design Big Picture Strategic Patterns
Ten Advices for Architects
Microsoft Teams More Than Just Chat
10 Hinweise für Architekten
cloud session uklug
Technical stories v1.2
Ad

More from Steve Pember (20)

PPTX
Spring I_O 2024 - Flexible Spring with Event Sourcing.pptx
PDF
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
PDF
Gradle Show and Tell
PDF
Reactive All the Way Down the Stack
PDF
Event storage in a distributed system
PDF
Harnessing Spark and Cassandra with Groovy
PDF
An introduction to Reactive applications, Reactive Streams, and options for t...
PDF
An Introduction to jOOQ
PDF
Reactive Streams and the Wide World of Groovy
PDF
A year with event sourcing and CQRS
PDF
An Introduction to Reactive Application, Reactive Streams, and options for JVM
PDF
Reactive Streams and the Wide World of Groovy
PPTX
Richer Data History with Event Sourcing (SpringOne 2GX 2015
PPTX
Springone2gx 2015 Reactive Options for Groovy
PPTX
Gr8conf US 2015 - Intro to Event Sourcing with Groovy
PPTX
Gr8conf US 2015: Reactive Options for Groovy
PPTX
Groovy Options for Reactive Applications - Greach 2015
PDF
Advanced Microservices - Greach 2015
PPTX
Richer data-history-event-sourcing
PPTX
Managing a Microservices Development Team (And advanced Microservice concerns)
Spring I_O 2024 - Flexible Spring with Event Sourcing.pptx
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Gradle Show and Tell
Reactive All the Way Down the Stack
Event storage in a distributed system
Harnessing Spark and Cassandra with Groovy
An introduction to Reactive applications, Reactive Streams, and options for t...
An Introduction to jOOQ
Reactive Streams and the Wide World of Groovy
A year with event sourcing and CQRS
An Introduction to Reactive Application, Reactive Streams, and options for JVM
Reactive Streams and the Wide World of Groovy
Richer Data History with Event Sourcing (SpringOne 2GX 2015
Springone2gx 2015 Reactive Options for Groovy
Gr8conf US 2015 - Intro to Event Sourcing with Groovy
Gr8conf US 2015: Reactive Options for Groovy
Groovy Options for Reactive Applications - Greach 2015
Advanced Microservices - Greach 2015
Richer data-history-event-sourcing
Managing a Microservices Development Team (And advanced Microservice concerns)
Ad

Recently uploaded (20)

PPTX
L1 - Introduction to python Backend.pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Nekopoi APK 2025 free lastest update
PDF
Digital Strategies for Manufacturing Companies
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Cost to Outsource Software Development in 2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Understanding Forklifts - TECH EHS Solution
PDF
System and Network Administration Chapter 2
L1 - Introduction to python Backend.pptx
How to Choose the Right IT Partner for Your Business in Malaysia
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Nekopoi APK 2025 free lastest update
Digital Strategies for Manufacturing Companies
Computer Software and OS of computer science of grade 11.pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
Why Generative AI is the Future of Content, Code & Creativity?
Digital Systems & Binary Numbers (comprehensive )
Cost to Outsource Software Development in 2025
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
wealthsignaloriginal-com-DS-text-... (1).pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Wondershare Filmora 15 Crack With Activation Key [2025
Understanding Forklifts - TECH EHS Solution
System and Network Administration Chapter 2

SACon 2019 - Surviving in a Microservices Environment