SlideShare a Scribd company logo
1 of 46
Download to read offline
Microservices
Are they for me?
Marian Marinov
Who am I?
➢ Director of Engineering at Web Hosting Canada
➢ Previously partner and Head of DevOps at SiteGround
➢ A SysAdmin and System Architect
➢ A hacker at heart
Why this talk?
Why this talk?
♥ ➢ I love microservices
Why this talk?
♥
♥
➢ I love microservices
➢ I love performance
Why this talk?
♥
♥
♥
➢ I love microservices
➢ I love performance
➢ I love smaller code bases
Why this talk?
♥
♥
♥
42
➢ I love microservices
➢ I love performance
➢ I love smaller code bases
➢ They are not always the answer
What are microservices?
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
Exception to the above definition:
➢ Scalability
➢ Microservice depending on other microservices
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
➢ API
* filesystem interface
* maybe added locking
What are microservices?
➢ A simple file or DB used for exchanging data
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
➢ API
* DB protocol
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
➢ API
* HTTP protocol
* RESTful GET/POST/PUT
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
* predefined event is triggering changes
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
* predefined event is triggering changes
* examples:
adding a user/changing balance on account
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
* predefined event is triggering changes
* examples:
adding a user/changing balance on account
* events trigger multiple different parts of the app
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
* predefined event is triggering changes
* examples:
adding a user/changing balance on account
* events trigger multiple different parts of the app
* the EDA is by definition decoupled
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
➢ Message passing interface(RabbitMQ, Kafka, etc.)
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
➢ Message passing interface(RabbitMQ, Kafka, etc.)
* Client/Worker or Publisher/Consumer models
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
➢ Message passing interface(RabbitMQ, Kafka, etc.)
* Client/Worker or Publisher/Consumer models
* The MPI is replacing the HTTP
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
➢ Message passing interface(RabbitMQ, Kafka, etc.)
* Client/Worker or Publisher/Consumer models
* The MPI is replacing the HTTP
* Easier access to your code
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
➢ Message passing interface(RabbitMQ, Kafka, etc.)
➢ Maybe GraphQL
➢ WebSockets
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are microservices?
➢ A simple file or DB used for exchanging data
➢ REST(maybe OpenAPI)
➢ EDA (event-driven architecture)
➢ Message passing interface(RabbitMQ, Kafka, etc.)
➢ Maybe GraphQL
➢ WebSockets
Use some form of communication between
decoupled parts of a bigger application.
A microservice is a small, self-contained process
which exposes an API to solve a single business need.
What are the benefi ts?
➢ Smaller
➢ code base
➢ operational data
➢ logical complexity
What are the benefi ts?
➢ Smaller
➢ code base
➢ operational data
➢ logical complexity
➢ “Make each program do one thing well.” - Ken Thompson
What are the benefi ts?
➢ Smaller
➢ code base
➢ operational data
➢ logical complexity
➢ “Make each program do one thing well.” - Ken Thompson
➢ Scalability
➢ less dependencies
➢ mostly self contained
What are the benefi ts?
➢ Smaller
➢ code base
➢ operational data
➢ logical complexity
➢ “Make each program do one thing well.” - Ken Thompson
➢ Scalability
➢ less dependencies
➢ mostly self contained
➢ Easier to maintain/update/upgrade
➢ smaller changes impact only this service
➢ upgrades are impacting only parts of our application infra
➢ easier blue-green deployments
What are the benefi ts?
➢ Smaller
➢ code base
➢ operational data
➢ logical complexity
➢ “Make each program do one thing well.” - Ken Thompson
➢ Scalability
➢ less dependencies
➢ mostly self contained
➢ Easier to maintain/update/upgrade
➢ Asynchronous code
What are the benefi ts?
➢ Smaller
➢ code base
➢ operational data
➢ logical complexity
➢ “Make each program do one thing well.” - Ken Thompson
➢ Scalability
➢ less dependencies
➢ mostly self contained
➢ Easier to maintain/update/upgrade
➢ Asynchronous code
➢ Partial failures
➢ feature flags/switches
Why not to choose them?
➢ Architectural complexity
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
➢ Handling single or multiple points of failure
➢ Integration testing
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
- should use common protocol and format
- sometimes impossible when using external services
➢ Handling single or multiple points of failure
➢ Integration testing
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
➢ Handling single or multiple points of failure
➢ Integration testing
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
➢ Handling single or multiple points of failure
➢ Integration testing
- on top of your unit testing
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
➢ Handling single or multiple points of failure
➢ Integration testing
➢ Data complexity
MOST OFTEN THE ROOT OF ALL EVIL
√DB
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
➢ Handling single or multiple points of failure
➢ Integration testing
➢ Data complexity
➢ DB Replication
- DO NOT replicate everything
- divide and conquer is your friend
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
➢ Handling single or multiple points of failure
➢ Integration testing
➢ Data complexity
➢ DB Replication
➢ Cache invalidation
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
➢ Handling single or multiple points of failure
➢ Integration testing
➢ Data complexity
➢ DB Replication
➢ Cache invalidation
➢ Data consistency
- strong vs eventual consistency models
Why not to choose them?
➢ Architectural complexity
➢ Authentication
➢ Multiple places where you have code
➢ Communication overhead
➢ Data format
➢ Handling single or multiple points of failure
➢ Integration testing
➢ Data complexity
➢ DB Replication
➢ Cache invalidation
➢ Data consistency
➢ Maybe MapReduce
- did all of the reducers finish
- did we start another map run before having available reducers
How to start?
Monolith first – by Martin Fowler
How to start?
Monolith first – by Martin Fowler
➢ Start with Monolith
How to start?
Monolith first – by Martin Fowler
➢ Start with Monolith
➢ If you already have big enough monolith
Look for places where async execution may be separated
➢
Look for hot paths with small logic footprint
➢
Separate one single logical part of the monolith
➢
➢ Strangler pattern
➢ Parts of the code that need to scale out(or that are frequently attacked)
How to start?
Monolith first – by Martin Fowler
➢ Start with Monolith
➢ If you already have big enough monolith
Look for places where async execution may be separated
➢
Look for hot paths with small logic footprint
➢
Separate one single logical part of the monolith
➢
➢ Strangler pattern
➢ Parts of the code that need to scale out(or that are frequently attacked)
➢ Do not start by redesigning all of your monolith
as microservices
How to start?
Monolith first – by Martin Fowler
➢ Start with Monolith
➢ If you already have big enough monolith
Look for places where async execution may be separated
➢
Look for hot paths with small logic footprint
➢
Separate one single logical part of the monolith
➢
➢ Strangler pattern
➢ Parts of the code that need to scale out(or that are frequently attacked)
➢ Do not start by redesigning all of your monolith
as microservices
➢ Do not start with microservice architecture unless you are
already at the scale that needs it
Thank you
Marian Marin
mm@yuhu.biz

More Related Content

Similar to Microservices: Benefits, drawbacks and are they for me?

2016_04_04_CNI_Spring_Meeting_Microservices
2016_04_04_CNI_Spring_Meeting_Microservices2016_04_04_CNI_Spring_Meeting_Microservices
2016_04_04_CNI_Spring_Meeting_Microservices
Jason Varghese
 

Similar to Microservices: Benefits, drawbacks and are they for me? (20)

GlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js DevelopersGlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js Developers
 
What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your Microservices
 
Music city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lakeMusic city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lake
 
Planning to Fail #phpuk13
Planning to Fail #phpuk13Planning to Fail #phpuk13
Planning to Fail #phpuk13
 
Getting out of the monolith hell
Getting out of the monolith hellGetting out of the monolith hell
Getting out of the monolith hell
 
Hail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open sourceHail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open source
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
56k.cloud training
56k.cloud training56k.cloud training
56k.cloud training
 
Simple Solutions for Complex Problems
Simple Solutions for Complex ProblemsSimple Solutions for Complex Problems
Simple Solutions for Complex Problems
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems
 
Phoenix for Rubyists
Phoenix for RubyistsPhoenix for Rubyists
Phoenix for Rubyists
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stack
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Building a Database for the End of the World
Building a Database for the End of the WorldBuilding a Database for the End of the World
Building a Database for the End of the World
 
NAVER Ceph Storage on ssd for Container
NAVER Ceph Storage on ssd for ContainerNAVER Ceph Storage on ssd for Container
NAVER Ceph Storage on ssd for Container
 
Become a Performance Diagnostics Hero
Become a Performance Diagnostics HeroBecome a Performance Diagnostics Hero
Become a Performance Diagnostics Hero
 
2016_04_04_CNI_Spring_Meeting_Microservices
2016_04_04_CNI_Spring_Meeting_Microservices2016_04_04_CNI_Spring_Meeting_Microservices
2016_04_04_CNI_Spring_Meeting_Microservices
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
 

More from Marian Marinov

More from Marian Marinov (20)

How to implement PassKeys in your application
How to implement PassKeys in your applicationHow to implement PassKeys in your application
How to implement PassKeys in your application
 
Dev.bg DevOps March 2024 Monitoring & Logging
Dev.bg DevOps March 2024 Monitoring & LoggingDev.bg DevOps March 2024 Monitoring & Logging
Dev.bg DevOps March 2024 Monitoring & Logging
 
Basic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsBasic presentation of cryptography mechanisms
Basic presentation of cryptography mechanisms
 
Introduction and replication to DragonflyDB
Introduction and replication to DragonflyDBIntroduction and replication to DragonflyDB
Introduction and replication to DragonflyDB
 
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQMessage Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
 
How to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdfHow to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdf
 
How to survive in the work from home era
How to survive in the work from home eraHow to survive in the work from home era
How to survive in the work from home era
 
Managing sysadmins
Managing sysadminsManaging sysadmins
Managing sysadmins
 
Improve your storage with bcachefs
Improve your storage with bcachefsImprove your storage with bcachefs
Improve your storage with bcachefs
 
Control your service resources with systemd
 Control your service resources with systemd  Control your service resources with systemd
Control your service resources with systemd
 
Comparison of-foss-distributed-storage
Comparison of-foss-distributed-storageComparison of-foss-distributed-storage
Comparison of-foss-distributed-storage
 
Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?
 
Securing your MySQL server
Securing your MySQL serverSecuring your MySQL server
Securing your MySQL server
 
Sysadmin vs. dev ops
Sysadmin vs. dev opsSysadmin vs. dev ops
Sysadmin vs. dev ops
 
DoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDKDoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDK
 
Challenges with high density networks
Challenges with high density networksChallenges with high density networks
Challenges with high density networks
 
SiteGround building automation
SiteGround building automationSiteGround building automation
SiteGround building automation
 
Preventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel trackingPreventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel tracking
 
Managing a lot of servers
Managing a lot of serversManaging a lot of servers
Managing a lot of servers
 
Let's Encrypt failures
Let's Encrypt failuresLet's Encrypt failures
Let's Encrypt failures
 

Recently uploaded

Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Recently uploaded (20)

Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 

Microservices: Benefits, drawbacks and are they for me?

  • 1. Microservices Are they for me? Marian Marinov
  • 2. Who am I? ➢ Director of Engineering at Web Hosting Canada ➢ Previously partner and Head of DevOps at SiteGround ➢ A SysAdmin and System Architect ➢ A hacker at heart
  • 4. Why this talk? ♥ ➢ I love microservices
  • 5. Why this talk? ♥ ♥ ➢ I love microservices ➢ I love performance
  • 6. Why this talk? ♥ ♥ ♥ ➢ I love microservices ➢ I love performance ➢ I love smaller code bases
  • 7. Why this talk? ♥ ♥ ♥ 42 ➢ I love microservices ➢ I love performance ➢ I love smaller code bases ➢ They are not always the answer
  • 8. What are microservices? A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 9. What are microservices? Exception to the above definition: ➢ Scalability ➢ Microservice depending on other microservices A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 10. What are microservices? A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 11. What are microservices? ➢ A simple file or DB used for exchanging data A microservice is a small, self-contained process which exposes an API to solve a single business need. ➢ API * filesystem interface * maybe added locking
  • 12. What are microservices? ➢ A simple file or DB used for exchanging data A microservice is a small, self-contained process which exposes an API to solve a single business need. ➢ API * DB protocol
  • 13. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) A microservice is a small, self-contained process which exposes an API to solve a single business need. ➢ API * HTTP protocol * RESTful GET/POST/PUT
  • 14. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 15. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) * predefined event is triggering changes A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 16. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) * predefined event is triggering changes * examples: adding a user/changing balance on account A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 17. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) * predefined event is triggering changes * examples: adding a user/changing balance on account * events trigger multiple different parts of the app A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 18. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) * predefined event is triggering changes * examples: adding a user/changing balance on account * events trigger multiple different parts of the app * the EDA is by definition decoupled A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 19. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) ➢ Message passing interface(RabbitMQ, Kafka, etc.) A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 20. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) ➢ Message passing interface(RabbitMQ, Kafka, etc.) * Client/Worker or Publisher/Consumer models A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 21. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) ➢ Message passing interface(RabbitMQ, Kafka, etc.) * Client/Worker or Publisher/Consumer models * The MPI is replacing the HTTP A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 22. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) ➢ Message passing interface(RabbitMQ, Kafka, etc.) * Client/Worker or Publisher/Consumer models * The MPI is replacing the HTTP * Easier access to your code A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 23. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) ➢ Message passing interface(RabbitMQ, Kafka, etc.) ➢ Maybe GraphQL ➢ WebSockets A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 24. What are microservices? ➢ A simple file or DB used for exchanging data ➢ REST(maybe OpenAPI) ➢ EDA (event-driven architecture) ➢ Message passing interface(RabbitMQ, Kafka, etc.) ➢ Maybe GraphQL ➢ WebSockets Use some form of communication between decoupled parts of a bigger application. A microservice is a small, self-contained process which exposes an API to solve a single business need.
  • 25. What are the benefi ts? ➢ Smaller ➢ code base ➢ operational data ➢ logical complexity
  • 26. What are the benefi ts? ➢ Smaller ➢ code base ➢ operational data ➢ logical complexity ➢ “Make each program do one thing well.” - Ken Thompson
  • 27. What are the benefi ts? ➢ Smaller ➢ code base ➢ operational data ➢ logical complexity ➢ “Make each program do one thing well.” - Ken Thompson ➢ Scalability ➢ less dependencies ➢ mostly self contained
  • 28. What are the benefi ts? ➢ Smaller ➢ code base ➢ operational data ➢ logical complexity ➢ “Make each program do one thing well.” - Ken Thompson ➢ Scalability ➢ less dependencies ➢ mostly self contained ➢ Easier to maintain/update/upgrade ➢ smaller changes impact only this service ➢ upgrades are impacting only parts of our application infra ➢ easier blue-green deployments
  • 29. What are the benefi ts? ➢ Smaller ➢ code base ➢ operational data ➢ logical complexity ➢ “Make each program do one thing well.” - Ken Thompson ➢ Scalability ➢ less dependencies ➢ mostly self contained ➢ Easier to maintain/update/upgrade ➢ Asynchronous code
  • 30. What are the benefi ts? ➢ Smaller ➢ code base ➢ operational data ➢ logical complexity ➢ “Make each program do one thing well.” - Ken Thompson ➢ Scalability ➢ less dependencies ➢ mostly self contained ➢ Easier to maintain/update/upgrade ➢ Asynchronous code ➢ Partial failures ➢ feature flags/switches
  • 31. Why not to choose them? ➢ Architectural complexity
  • 32. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format ➢ Handling single or multiple points of failure ➢ Integration testing
  • 33. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format - should use common protocol and format - sometimes impossible when using external services ➢ Handling single or multiple points of failure ➢ Integration testing
  • 34. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format ➢ Handling single or multiple points of failure ➢ Integration testing
  • 35. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format ➢ Handling single or multiple points of failure ➢ Integration testing - on top of your unit testing
  • 36. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format ➢ Handling single or multiple points of failure ➢ Integration testing ➢ Data complexity MOST OFTEN THE ROOT OF ALL EVIL √DB
  • 37. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format ➢ Handling single or multiple points of failure ➢ Integration testing ➢ Data complexity ➢ DB Replication - DO NOT replicate everything - divide and conquer is your friend
  • 38. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format ➢ Handling single or multiple points of failure ➢ Integration testing ➢ Data complexity ➢ DB Replication ➢ Cache invalidation
  • 39. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format ➢ Handling single or multiple points of failure ➢ Integration testing ➢ Data complexity ➢ DB Replication ➢ Cache invalidation ➢ Data consistency - strong vs eventual consistency models
  • 40. Why not to choose them? ➢ Architectural complexity ➢ Authentication ➢ Multiple places where you have code ➢ Communication overhead ➢ Data format ➢ Handling single or multiple points of failure ➢ Integration testing ➢ Data complexity ➢ DB Replication ➢ Cache invalidation ➢ Data consistency ➢ Maybe MapReduce - did all of the reducers finish - did we start another map run before having available reducers
  • 41. How to start? Monolith first – by Martin Fowler
  • 42. How to start? Monolith first – by Martin Fowler ➢ Start with Monolith
  • 43. How to start? Monolith first – by Martin Fowler ➢ Start with Monolith ➢ If you already have big enough monolith Look for places where async execution may be separated ➢ Look for hot paths with small logic footprint ➢ Separate one single logical part of the monolith ➢ ➢ Strangler pattern ➢ Parts of the code that need to scale out(or that are frequently attacked)
  • 44. How to start? Monolith first – by Martin Fowler ➢ Start with Monolith ➢ If you already have big enough monolith Look for places where async execution may be separated ➢ Look for hot paths with small logic footprint ➢ Separate one single logical part of the monolith ➢ ➢ Strangler pattern ➢ Parts of the code that need to scale out(or that are frequently attacked) ➢ Do not start by redesigning all of your monolith as microservices
  • 45. How to start? Monolith first – by Martin Fowler ➢ Start with Monolith ➢ If you already have big enough monolith Look for places where async execution may be separated ➢ Look for hot paths with small logic footprint ➢ Separate one single logical part of the monolith ➢ ➢ Strangler pattern ➢ Parts of the code that need to scale out(or that are frequently attacked) ➢ Do not start by redesigning all of your monolith as microservices ➢ Do not start with microservice architecture unless you are already at the scale that needs it