Surviving In A Microservices
Environment
Steve Pember
CTO, ThirdChannel
Gr8Conf US, 2017
@svpember
@svpember
Microservice Blog Posts & Presentations
• Microservices: Yay!
• Microservices: Boo!
• Smashing The Monolith (and here’s how we did it)
• Microservices + Technology X
• Microservices + Methodology Y
Microservices have many lessons to offer
What even are Microservices?
Surviving in a microservices environment
@svpember
Why Choose Microservices?
• Reduce Coupling!
• 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)
Surviving in a microservices environment
Surviving in a microservices environment
Help?
@svpember
Microservice Topics
• Infrastructure
• Architecture
• Team Communication
• Miscellaneous Advice
@svpember
Microservice Topics
• Infrastructure
@svpember
Infrastructure
• How do we manage the logs?
Centralized Logs are your
#1 Priority
@svpember
@svpember
@svpember
@svpember
@svpember
@svpember
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
You’d best be monitoring your platform.
Surviving in a microservices environment
–Johnny Appleseed
“Type a quote here.”
Surviving in a microservices environment
@svpember
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
Surviving in a microservices environment
@svpember
@svpember
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
@svpember
@svpember
@svpember
@svpember
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
Check Style? Coverage?
@svpember
@svpember
@svpember
@svpember
@svpember
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
• Can I generate a Service template?
wget https://github.com/thirdchannel/base-template/
archive/release.zip
(This is not a real url, but you get the idea)
@svpember
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
• Can I generate a Service template?
• How do we share code?
Whoops! Gotcha!
Surviving in a microservices environment
@svpember
Sharing Code
• It’s OK to reimplement functionality within each service
• Setup your own internal Artifactory!
• DO share infrastructure libraries (e.g. communications)
• NEVER share Domain or business logic libraries
@svpember
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
• Can I generate a Service template?
• How do we share code?
• How do we manage our (multiple) environments?
@svpember
Test & Develop in Isolation
@svpember
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
• Can I generate a Service template?
• How do we share code?
• How do we manage our (multiple) environments?
• Do our Devs get time to work on Infrastructure?
@svpember
Microservice Topics
• Infrastructure
• Architecture
@svpember
Architecture
• Do we have an overall design vision?
Does Anyone Know What We’re Doing?!
Surviving in a microservices environment
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 new technologies?
@svpember
@svpember
Be Careful When Choosing
New Tech
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing new technologies?
• How do we test an individual service?
Integration Tests are the Best Tests
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing new technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
@svpember
Test Environment
• Run periodically (e.g. nightly)
• Each service generates fixture data
• Service data reset after EACH test
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing new technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
• How do our services communicate?
HTTP vs Async Events
@svpember
HTTP
• Well Established
• Built In libraries
• Existing structure for response codes (2**, 4**, 5**, etc)
• Synchronous
• Increases coupling
• Requires services to know which others require their data
• Has dependency on Service Discovery mechanism
• Susceptible to Data Loss
@svpember
Events
• Asynchronous
• Pub-sub / Fire and forget
• Loose Coupling
• Prevents Data Loss
• Allows for Reactive systems
• No existing structure for response error handling
• Dependency on Message Broker technology
• Can be difficult for Junior folks to understand
Ensure you have Circuit Breaker or a Dead
Letter Mechanism
@svpember
@svpember
<3 RabbitMq
• Intelligent broker; dumb consumers
• Highly nuanced & robust routing
• Backpressure
• Dead letters /retries
• Message Ordering
• Multiple deliveries
• Ack / Nack/ Reject … re-enqueue
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing new technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
• How do our services communicate?
• How/where is our data persisted?
@svpember
Locality of Reference
• Spatial: “How close together is our data?”
@svpember
Locality of Reference
• Spatial: “How close together is our data?”
• Temporal: “How often is our data accessed?”
@svpember
@svpember
Beware the ‘Mini-Monolith’
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing new technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
• How do our services communicate?
• How/where is our data persisted?
• Do we follow an overall architectural style?
Make Sure Everyone Is Aware
Applies to Both Intra- and Inter-Service
It all
Started
With =>
@svpember
Domain Driven Design
• Ubiquitous Language
• Entities
• Aggregates
• Bounded Contexts
• No Direct communications across Boundaries
@svpember
@svpember
… And CQRS
@svpember
@svpember
Allows for interesting
Architectures
Surviving in a microservices environment
While we’re at it, go Reactive
@svpember
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing new technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
• How do our services communicate?
• How/where is our data persisted?
• Do we follow an overall architectural style?
• When do we create new services?
DDD to the rescue
Surviving in a microservices environment
@svpember
New Service?
• Initially: design platform around Bounded Contexts, create services from
inner Contexts
• Don’t create services ‘just because’
• Do make an effort to identify boundaries
• Ensure a service has/will have proper context boundaries before creating
• If two services need to communicate synchronously or frequently, good
candidates for MERGING
# of services < # of developers
@svpember
Microservice Topics
• Infrastructure
• Architecture
• Team Communication
@svpember
Team Communication
• How are our teams structured?
Conway’s Law is REAL
–Johnny Appleseed
“Type a quote here.”
DBA
Engineers
QA
UX
@svpember
@svpember
Team Communication
• How are our teams structured?
• Who owns which Service?
Teams should be Owners
@svpember
Team Communication
• How are our teams structured?
• Who owns which Service?
• What’s our process for merging code?
Surviving in a microservices environment
@svpember
Team Communication
• How are our teams structured?
• Who owns which Service?
• What’s our process for merging code?
• What’s our process for releasing code?
@svpember
@svpember
Team Communication
• How are our teams structured?
• Who owns which Service?
• What’s our process for merging code?
• What’s our process for releasing code?
• What’s our process for monitoring code in production? Dealing with bugs?
@svpember
–Johnny Appleseed
“Type a quote here.”
@svpember
Team Communication
• How are our teams structured?
• Who owns which Service?
• What’s our process for merging code?
• What’s our process for releasing code?
• What’s our process for monitoring code in production? Dealing with bugs?
• Do we add more process if something goes wrong?
Be Reluctant to Add
New Process
High Freedom / High Responsibility
@svpember
Microservice Topics
• Infrastructure
• Architecture
• Team Communication
• Miscellaneous Advice
@svpember
Miscellaneous Advice
• Don’t get cute with the naming of services
Any idea
what these
do?
@svpember
Miscellaneous Advice
• Don’t get cute with the naming of services
• New Feature -> walk backwards from what the user will see
@svpember
Miscellaneous Advice
• Don’t get cute with the naming of services
• New Feature -> walk backwards from what the user will see
• Release when a feature is ready
@svpember
Miscellaneous Advice
• Don’t get cute with the naming of services
• New Feature -> walk backwards from what the user will see
• Release when a feature is ready
• If a service A has another service B as a dependency => release B first
@svpember
Miscellaneous Advice
• Don’t get cute with the naming of services
• New Feature -> walk backwards from what the user will see
• Release when a feature is ready
• If a service A has another service B as a dependency => release B first
• How to bootstrap a new service?
@svpember
Miscellaneous Advice
• Don’t get cute with the naming of services
• New Feature -> walk backwards from what the user will see
• Release when a feature is ready
• If a service A has another service B as a dependency => release B first
• How to bootstrap a new service?
• Don’t release Friday afternoons
In Summary
Most of the Challenge is In infrastructure
<3
Microservices
Please share your survival tips!
Any Questions?
Anything I missed?
Thank you!
@svpember
@svpember
Images
• Bad Odds (Jon Snow): https://www.reddit.com/r/gameofthrones/comments/4owm95/s6e9_megathread_gifwallpaperscreenshot_requests/
• 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
• Picard FacePalm: https://www.flickr.com/photos/30418788@N03/8381426895
• Council of Ricks: https://www.reddit.com/r/rickandmorty/comments/3exy00/it_looks_like_there_might_some_sort_of_council_of/
• Drago (break you): https://giphy.com/gifs/GWD5nSpiHxs3K
• Wrecking Ball: https://www.flickr.com/photos/rhysasplundh/5202454842/in/photostream/
• Rocky Stairs: http://pixgood.com/rocky-stairs.html
• Technical Difficulties: https://www.youtube.com/watch?v=EC15BmzsdhM
• Grafana example: https://i.imgur.com/KOqcD6L.png
• Zipkin example: https://blog.buoyant.io/2016/05/17/distributed-tracing-for-polyglot-microservices/
• Assembly Line: http://www.solidsmack.com/culture/humans-need-apply-new-short-film-explores-future-robots-manufacturing-automation/
@svpember
Links
• Eric Evans: DDD and Microservices: https://www.youtube.com/watch?
v=yPvef9R3k-M

More Related Content

PDF
Surviving in a Microservices environment -abridged
PDF
Greach 2018: Surviving Microservices
PDF
SACon 2019 - Surviving in a Microservices Environment
PDF
Reactive All the Way Down the Stack
PPTX
Service Architectures At Scale - QCon London 2015
PDF
6 reasons Jubilee could be a Rubyist's new best friend
PPTX
Effective Microservices In a Data-centric World
PPTX
QCon New York 2014 - Scalable, Reliable Analytics Infrastructure at KIXEYE
Surviving in a Microservices environment -abridged
Greach 2018: Surviving Microservices
SACon 2019 - Surviving in a Microservices Environment
Reactive All the Way Down the Stack
Service Architectures At Scale - QCon London 2015
6 reasons Jubilee could be a Rubyist's new best friend
Effective Microservices In a Data-centric World
QCon New York 2014 - Scalable, Reliable Analytics Infrastructure at KIXEYE

What's hot (20)

PDF
Deployment Nirvana
PDF
Server’s variations bsw2015
PPTX
The Importance of Culture: Building and Sustaining Effective Engineering Org...
PPTX
Cloud fail scaling to infinity but not beyond
PPTX
Serverless Toronto helps Startups
PPTX
My Little Webap - DevOpsSec is Magic
PPTX
Build software like a bag of marbles, not a castle of LEGO®
PDF
Message Architectures in Distributed Systems - Data Day Texas 2013-01-11
PPTX
Concurrency at Scale: Evolution to Micro-Services
PPTX
Minimum Viable Architecture -- Good Enough is Good Enough in a Startup
PDF
Api fundamentals
PDF
DevOps in the Real World
PPTX
An Agile Approach to Machine Learning
PPTX
Dbops, DevOps & Ops, by Eduardo Piairo
PPTX
DevOps - It's About How We Work
PDF
An Introduction to jOOQ
PDF
An Iterative Approach to Service Oriented Architecture
PPTX
Embracing Failure - Fault Injection and Service Resilience at Netflix
PPTX
Engineering Netflix Global Operations in the Cloud
PPT
Polyglottany Is Not A Sin
Deployment Nirvana
Server’s variations bsw2015
The Importance of Culture: Building and Sustaining Effective Engineering Org...
Cloud fail scaling to infinity but not beyond
Serverless Toronto helps Startups
My Little Webap - DevOpsSec is Magic
Build software like a bag of marbles, not a castle of LEGO®
Message Architectures in Distributed Systems - Data Day Texas 2013-01-11
Concurrency at Scale: Evolution to Micro-Services
Minimum Viable Architecture -- Good Enough is Good Enough in a Startup
Api fundamentals
DevOps in the Real World
An Agile Approach to Machine Learning
Dbops, DevOps & Ops, by Eduardo Piairo
DevOps - It's About How We Work
An Introduction to jOOQ
An Iterative Approach to Service Oriented Architecture
Embracing Failure - Fault Injection and Service Resilience at Netflix
Engineering Netflix Global Operations in the Cloud
Polyglottany Is Not A Sin
Ad

Viewers also liked (20)

PDF
Pragmatic extreme programming
PDF
Verda Cloud Family
PDF
A 9 line shop powered by armeria
PPTX
JJUG CCC 2016 fall バイトコードが君のトモダチになりたがっている
PDF
Central Dogma LINE's Git-backed highly-available service configuration reposi...
PDF
A 3 difficult challenges that line has overcome
PDF
Parallel Selenium Test With Docker
PDF
AliExpress’ Way to Microservices - microXchg 2017
PDF
俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略
PDF
LINE Login - new features and mechanism
PDF
Data Processing behind LINE Game Platform
PDF
Creators Studio Trimming Tool
PDF
PIP in LINE iOS
PDF
Zookeeper In Action
PDF
Data analysis for security The log analysis platform Monolith and spam count...
PDF
Paying back technical debt - A case study of LINE Android client -
PDF
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
PDF
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
PPTX
LINE Things
PPTX
In-app Web Framework
Pragmatic extreme programming
Verda Cloud Family
A 9 line shop powered by armeria
JJUG CCC 2016 fall バイトコードが君のトモダチになりたがっている
Central Dogma LINE's Git-backed highly-available service configuration reposi...
A 3 difficult challenges that line has overcome
Parallel Selenium Test With Docker
AliExpress’ Way to Microservices - microXchg 2017
俺のコードがどこでつかわれているのかわからない問題 あるいはマイナーOSSの生存戦略
LINE Login - new features and mechanism
Data Processing behind LINE Game Platform
Creators Studio Trimming Tool
PIP in LINE iOS
Zookeeper In Action
Data analysis for security The log analysis platform Monolith and spam count...
Paying back technical debt - A case study of LINE Android client -
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
LINE Things
In-app Web Framework
Ad

Similar to Surviving in a microservices environment (20)

PPTX
The Big Picture - Integrating Buzzwords
PDF
Microservices for java architects schamburg-2015-05-19
PDF
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
PDF
Microservices for Architects - Atlanta 2018-03-28
PDF
Microservices: The Best Practices
PDF
Microservices for java architects it-symposium-2015-09-15
PDF
Microservices for Java Architects (Chicago, April 21, 2015)
PDF
Intro to Microservices
PDF
Surviving in a Microservices Environment
PPTX
Azure Application Architecture Guide
PDF
Microservices for architects los angeles-2016-07-16
PDF
Software Architecture and Architectors: useless VS valuable
PPTX
Let's talk about... Microservices
PDF
Microservices: State of the Union
PDF
Writing microservices in Java -- Chicago-2015-11-10
PPTX
Architecting Microservices in .Net
PPTX
Melbourne Microservices Meetup: Agenda for a new Architecture
PDF
Writing microservices in java java one-2015-10-28
PDF
Microservices for java architects coders-conf-2015-05-15
PPTX
Cloud to hybrid edge cloud evolution Jun112020.pptx
The Big Picture - Integrating Buzzwords
Microservices for java architects schamburg-2015-05-19
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Microservices for Architects - Atlanta 2018-03-28
Microservices: The Best Practices
Microservices for java architects it-symposium-2015-09-15
Microservices for Java Architects (Chicago, April 21, 2015)
Intro to Microservices
Surviving in a Microservices Environment
Azure Application Architecture Guide
Microservices for architects los angeles-2016-07-16
Software Architecture and Architectors: useless VS valuable
Let's talk about... Microservices
Microservices: State of the Union
Writing microservices in Java -- Chicago-2015-11-10
Architecting Microservices in .Net
Melbourne Microservices Meetup: Agenda for a new Architecture
Writing microservices in java java one-2015-10-28
Microservices for java architects coders-conf-2015-05-15
Cloud to hybrid edge cloud evolution Jun112020.pptx

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
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
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)
PDF
Reactive Microservice Architecture with Groovy and Grails
PPT
Why Reactive Architecture Will Take Over The World (and why we should be wary...
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
Event storage in a distributed system
Harnessing Spark and Cassandra with Groovy
An introduction to Reactive applications, Reactive Streams, and options for t...
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)
Reactive Microservice Architecture with Groovy and Grails
Why Reactive Architecture Will Take Over The World (and why we should be wary...

Recently uploaded (20)

PDF
AI Guide for Business Growth - Arna Softech
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PDF
E-Commerce Website Development Companyin india
PPTX
Matchmaking for JVMs: How to Pick the Perfect GC Partner
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
Airline CRS | Airline CRS Systems | CRS System
PPTX
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
Tech Workshop Escape Room Tech Workshop
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PPTX
CNN LeNet5 Architecture: Neural Networks
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
How to Odoo 19 Installation on Ubuntu - CandidRoot
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
Type Class Derivation in Scala 3 - Jose Luis Pintado Barbero
PPTX
GSA Content Generator Crack (2025 Latest)
PPTX
Computer Software - Technology and Livelihood Education
AI Guide for Business Growth - Arna Softech
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
E-Commerce Website Development Companyin india
Matchmaking for JVMs: How to Pick the Perfect GC Partner
Topaz Photo AI Crack New Download (Latest 2025)
Airline CRS | Airline CRS Systems | CRS System
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
iTop VPN Crack Latest Version Full Key 2025
Tech Workshop Escape Room Tech Workshop
Wondershare Recoverit Full Crack New Version (Latest 2025)
CNN LeNet5 Architecture: Neural Networks
How to Use SharePoint as an ISO-Compliant Document Management System
CCleaner 6.39.11548 Crack 2025 License Key
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
How to Odoo 19 Installation on Ubuntu - CandidRoot
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Type Class Derivation in Scala 3 - Jose Luis Pintado Barbero
GSA Content Generator Crack (2025 Latest)
Computer Software - Technology and Livelihood Education

Surviving in a microservices environment