SlideShare a Scribd company logo
1 of 87
Download to read offline
Microservices.
Mastering Chaos
©2000-2017 PortaOne, Inc. All rights reserved
Maxim Kondratenko
Head of Development department
Antiplan
● What is service/microservice oriented
architecture
Antiplan
● What is service/microservice oriented
architecture
● History
Antiplan
● What is service/microservice oriented
architecture
● History
● Comparing (monolith vs microservices)
Plan
Problems :
Plan
Problems :
● At the beginning
○ Organization
○ Technical
Plan
Problems :
● At the beginning
○ Organization
○ Technical
● During development
Plan
Problems :
● At the beginning
○ Organization
○ Technical
● During development
● While testing
Plan
Problems :
● At the beginning
○ Organization
○ Technical
● During development
● While testing
● In production
Problems at the beginning
Problems at the beginning
LEGACY
Problems at the beginning.
Organization (legacy)
"Organizations which design systems ... are
constrained to produce designs which are copies of
the communication structures of these
organizations."
M. Conway
Problems at the beginning.
Teams for monolith
Conway's Law in action
(https://martinfowler.com/articles/microservices.html)
Problems at the beginning.
Teams for microservices
Service boundaries reinforced by team boundaries
(https://martinfowler.com/articles/microservices.html)
Problems at the beginning.
Organization (legacy)
Problems at the beginning.
Organization (legacy)
● Only one host for running the service
Problems at the beginning.
Organization (legacy)
● Only one host for running the service
● Any possible way used to get data
Problems at the beginning.
Organization (legacy)
● Only one host for running the service
● Any possible way used to get data
● All data is located “nearby”
Monolith first! Or not?
(https://martinfowler.com/bliki/MicroservicePremium.html)
Problems at the beginning
(technical). “Citizen” rules
Define:
Problems at the beginning
(technical). “Citizen” rules
Define:
● Running env (bare metal/VM/container;
host/guest OS; rpm/image/git)
Problems at the beginning
(technical). “Citizen” rules
Define:
● Running env (bare metal/VM/container;
host/guest OS; rpm/image/git)
● Update policy (major/hotfixes/API)
Problems at the beginning
(technical). “Citizen” rules
Define:
● Running env (bare metal/VM/container;
host/guest OS; rpm/image/git)
● Update policy (major/hotfixes/API)
● One common name format (domain names)
Problems at the beginning
(technical). “Citizen” rules
Define:
● Running env (bare metal/VM/container;
host/guest OS; rpm/image/git)
● Update policy (major/hotfixes/API)
● One common name format (domain names)
● Communication protocol (RPC/messages)
Problems at the beginning
(technical). “Citizen” rules
Decide whether to use:
Problems at the beginning
(technical). “Citizen” rules
Decide whether to use:
● Orchestration system
Problems at the beginning
(technical). “Citizen” rules
Decide whether to use:
● Orchestration system
● Service discovery (use domain names)
Problems at the beginning
(technical). “Citizen” rules
Decide whether to use:
● Orchestration system
● Service discovery (use domain names)
● Secured/unsecured communication channels
Problems at the beginning
(technical). “Citizen” rules
Decide whether to use:
● Orchestration system
● Service discovery (use domain names)
● Secured/unsecured communication channels
● Scalable services
Problems at the beginning
(technical). “Citizen” rules
Decide whether to use:
● Orchestration system
● Service discovery (use domain names)
● Secured/unsecured communication channels
● Scalable services
● Stateless/stateful services
Problems at the beginning.
Summary
● Get rid of monolith in the head
Problems at the beginning.
Summary
● Get rid of monolith in the head
● Prepare your background
Problems at the beginning.
Summary
● Get rid of monolith in the head
● Prepare your background
● Make a plan
Problems at the beginning.
Summary
● Get rid of monolith in the head
● Prepare your background
● Make a plan
● Microservices can be as much effective
as difficult
Problems during development
Usage of shared libraries
Keep in mind
“network in the middle”
Distributed functions calls
(https://martinfowler.com/articles/distributed-objects-microservices.html)
Problems with API
● Get data via separate call
Problems with API
● Get data via separate call
● Get extra data
Problems with API
● Get data via separate call
● Get extra data
● Cache RPC results
Problems with API
● Get data via separate call
● Get extra data
● Cache RPC results
● Chain of calls
Problems with API
● Get data via separate call
● Get extra data
● Cache RPC results
● Chain of calls
● Versioning
Problems with API
● Get data via separate call
● Get extra data
● Cache RPC results
● Chain of calls
● Versioning
● APIs are forever
Documentation
Development environment
Used for development/testing:
Development environment
Used for development/testing:
● Own PC/laptop
Development environment
Used for development/testing:
● Own PC/laptop
● Own OS/libs
Development environment
Used for development/testing:
● Own PC/laptop
● Own OS/libs
● Only “my” service for running/testing
Development environment
Used for development/testing:
● Own PC/laptop
● Own OS/libs
● Only “my” service for running/testing
● Only one process per service
Development environment
Used for development/testing:
● Own PC/laptop
● Own OS/libs
● Only “my” service for running/testing
● Only one process per service
● And have full control over
service/process/logs/data/...
Problems during
development. Summary
● Don’t use common/shared libs
Problems during
development. Summary
● Don’t use common/shared libs
● Design API for your needs
Problems during
development. Summary
● Don’t use common/shared libs
● Design API for your needs
● Write documentation
Problems during
development. Summary
● Don’t use common/shared libs
● Design API for your needs
● Write documentation
● Consider at least 2 instances of each
service at any time
Problems during
development. Summary
● Don’t use common/shared libs
● Design API for your needs
● Write documentation
● Consider at least 2 instances of each
service at any time
● Start with orchestration system
Problems while testing
How to test all this “zoo”?
Straightforward testing flow
basic build/test pipeline
(https://martinfowler.com/articles/microservices.html)
Problems while testing
What should we test?
Problems while testing
Testing critical parts
Problems while testing.
Summary
● Automate testing
Problems while testing.
Summary
● Automate testing
● Create build/testing pipeline
Problems while testing.
Summary
● Automate testing
● Create build/testing pipeline
● Define critical services that have to be
tested anyway
Problems in production
Release...
Face the reality
When something crashes...
Need more info
Developer asks to:
Need more info
Developer asks to:
● Provide with steps to reproduce (STR)
Need more info
Developer asks to:
● Provide with steps to reproduce (STR)
● Turn on debug mode/levels/...
Need more info
Developer asks to:
● Provide with steps to reproduce (STR)
● Turn on debug mode/levels/...
● Gather logs
Need more info
Developer asks to:
● Provide with steps to reproduce (STR)
● Turn on debug mode/levels/...
● Gather logs
● Get request/response data
Need more info
Developer asks to:
● Provide with steps to reproduce (STR)
● Turn on debug mode/levels/...
● Gather logs
● Get request/response data
● Provide with access to server
Where is my service?
Problems in production.
Summary
● Use request tracing over services (traceID)
Problems in production.
Summary
● Use request tracing over services (traceID)
● Use traceID in logging
Problems in production.
Summary
● Use request tracing over services (traceID)
● Use traceID in logging
● Use log aggregator
Problems in production.
Summary
● Use request tracing over services (traceID)
● Use traceID in logging
● Use log aggregator
● Gather container/system metrics
Problems in production.
Summary
● Use request tracing over services (traceID)
● Use traceID in logging
● Use log aggregator
● Gather container/system metrics
● Gather application metrics
Problems in production.
Summary
● Use request tracing over services (traceID)
● Use traceID in logging
● Use log aggregator
● Gather container/system metrics
● Gather application metrics
● Check system availability from different world
zones
Problems in production.
Summary
● Use request tracing over services (traceID)
● Use traceID in logging
● Use log aggregator
● Gather container/system metrics
● Gather application metrics
● Check system availability from different world
zones
● Use self-health checks
Global summary
● Microservices can be as much effective as
difficult
Global summary
● Microservices can be as much effective as
difficult
● Prepare your teams and workflows
Global summary
● Microservices can be as much effective as
difficult
● Prepare your teams and workflows
● Make a plan for development/testing/support in
production
Global summary
● Microservices can be as much effective as
difficult
● Prepare your teams and workflows
● Make a plan for development/testing/support in
production
● Leave “bread crumbs”
Global summary
● Microservices can be as much effective as
difficult
● Prepare your teams and workflows
● Make a plan for development/testing/support in
production
● Leave “bread crumbs”
● Enjoy!
Thank you for attention!

More Related Content

Similar to Microservices. Mastering Chaos

Foundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsFoundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose Applications
Ching-Hwa Yu
 
Hybrid Automation Framework Developement
Hybrid Automation Framework DevelopementHybrid Automation Framework Developement
Hybrid Automation Framework Developement
Glasdon Falcao
 

Similar to Microservices. Mastering Chaos (20)

Data Science in Production: Technologies That Drive Adoption of Data Science ...
Data Science in Production: Technologies That Drive Adoption of Data Science ...Data Science in Production: Technologies That Drive Adoption of Data Science ...
Data Science in Production: Technologies That Drive Adoption of Data Science ...
 
JDD 2016 - Jedrzej Dabrowa - Distributed System Fault Injection Testing With ...
JDD 2016 - Jedrzej Dabrowa - Distributed System Fault Injection Testing With ...JDD 2016 - Jedrzej Dabrowa - Distributed System Fault Injection Testing With ...
JDD 2016 - Jedrzej Dabrowa - Distributed System Fault Injection Testing With ...
 
Configuring in the Browser, Really!
Configuring in the Browser, Really!Configuring in the Browser, Really!
Configuring in the Browser, Really!
 
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
 
Releaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy processReleaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy process
 
MockServer-driven testing
MockServer-driven testingMockServer-driven testing
MockServer-driven testing
 
The Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security TestingThe Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security Testing
 
Foundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsFoundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose Applications
 
SCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome ThemSCM Transformation Challenges and How to Overcome Them
SCM Transformation Challenges and How to Overcome Them
 
Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...Lessons learned from designing QA automation event streaming platform(IoT big...
Lessons learned from designing QA automation event streaming platform(IoT big...
 
Hybrid Automation Framework Developement
Hybrid Automation Framework DevelopementHybrid Automation Framework Developement
Hybrid Automation Framework Developement
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo
#OSSPARIS19 - How to improve database observability - CHARLES JUDITH, Criteo
 
Your Testing Is Flawed: Introducing A New Open Source Tool For Accurate Kuber...
Your Testing Is Flawed: Introducing A New Open Source Tool For Accurate Kuber...Your Testing Is Flawed: Introducing A New Open Source Tool For Accurate Kuber...
Your Testing Is Flawed: Introducing A New Open Source Tool For Accurate Kuber...
 
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CDMulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
 
2016 Federal User Group Conference - TeamForge Capabilities and Directions
2016 Federal User Group Conference - TeamForge Capabilities and Directions2016 Federal User Group Conference - TeamForge Capabilities and Directions
2016 Federal User Group Conference - TeamForge Capabilities and Directions
 
Distributed systems - A Primer
Distributed systems - A PrimerDistributed systems - A Primer
Distributed systems - A Primer
 
Simplifying debugging for multi-core Linux devices and low-power Linux clusters
Simplifying debugging for multi-core Linux devices and low-power Linux clusters Simplifying debugging for multi-core Linux devices and low-power Linux clusters
Simplifying debugging for multi-core Linux devices and low-power Linux clusters
 
Scaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflowScaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflow
 
WebRTC Standards & Implementation Q&A - Testing WebRTC 1.0
WebRTC Standards & Implementation Q&A - Testing WebRTC 1.0WebRTC Standards & Implementation Q&A - Testing WebRTC 1.0
WebRTC Standards & Implementation Q&A - Testing WebRTC 1.0
 

More from UP2IT

More from UP2IT (18)

Сочетание классической и гибкой методологий управления проектами
Сочетание классической и гибкой методологий управления проектамиСочетание классической и гибкой методологий управления проектами
Сочетание классической и гибкой методологий управления проектами
 
Go для веба глазами PHP-разработчика
Go для веба глазами PHP-разработчикаGo для веба глазами PHP-разработчика
Go для веба глазами PHP-разработчика
 
Дизайнер в эпоху цифровых перемен
Дизайнер в эпоху цифровых переменДизайнер в эпоху цифровых перемен
Дизайнер в эпоху цифровых перемен
 
Продуктовий дизайн і UX / UI дизайн процеси при розробці цифрових продуктів
Продуктовий дизайн і UX / UI дизайн процеси при розробці цифрових продуктівПродуктовий дизайн і UX / UI дизайн процеси при розробці цифрових продуктів
Продуктовий дизайн і UX / UI дизайн процеси при розробці цифрових продуктів
 
Модели OPEN SOURCE компаний и можно ли выжить без OPEN CORE и ENTERPRISE EDITION
Модели OPEN SOURCE компаний и можно ли выжить без OPEN CORE и ENTERPRISE EDITIONМодели OPEN SOURCE компаний и можно ли выжить без OPEN CORE и ENTERPRISE EDITION
Модели OPEN SOURCE компаний и можно ли выжить без OPEN CORE и ENTERPRISE EDITION
 
VR/AR в бизнесе
VR/AR в бизнесеVR/AR в бизнесе
VR/AR в бизнесе
 
Native DB transactions
Native DB transactionsNative DB transactions
Native DB transactions
 
Hell 2 Heaven or Choosing Cloud Provider
Hell 2 Heaven or Choosing Cloud ProviderHell 2 Heaven or Choosing Cloud Provider
Hell 2 Heaven or Choosing Cloud Provider
 
Automation pyramid within CI process
Automation pyramid within CI processAutomation pyramid within CI process
Automation pyramid within CI process
 
Containers, containers, containers...
Containers, containers, containers...Containers, containers, containers...
Containers, containers, containers...
 
Kotlin для розробки Android
Kotlin для розробки AndroidKotlin для розробки Android
Kotlin для розробки Android
 
React. Learn once, write anywhere
React. Learn once, write anywhereReact. Learn once, write anywhere
React. Learn once, write anywhere
 
Сложности и специфика построения систем раздачи адалт видео контента
Сложности и специфика построения систем раздачи адалт видео контентаСложности и специфика построения систем раздачи адалт видео контента
Сложности и специфика построения систем раздачи адалт видео контента
 
H2H Communication in IT
H2H Communication in ITH2H Communication in IT
H2H Communication in IT
 
Как я не стал барабанщиком или Как менеджер создает ценность
Как я не стал барабанщиком или Как менеджер создает ценностьКак я не стал барабанщиком или Как менеджер создает ценность
Как я не стал барабанщиком или Как менеджер создает ценность
 
Epic Sales Fails Compilation
Epic Sales Fails CompilationEpic Sales Fails Compilation
Epic Sales Fails Compilation
 
Design Thinking
Design ThinkingDesign Thinking
Design Thinking
 
Как настроенные процессы повышают прибыльность и снижают стресс
Как настроенные процессы повышают прибыльность и снижают стрессКак настроенные процессы повышают прибыльность и снижают стресс
Как настроенные процессы повышают прибыльность и снижают стресс
 

Recently uploaded

If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
Sheetaleventcompany
 

Recently uploaded (20)

Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptx
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 

Microservices. Mastering Chaos