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?

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 DevelopersRob Tweed
 
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 MicroservicesMatt Turner
 
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 lakeTimothy Spann
 
Planning to Fail #phpuk13
Planning to Fail #phpuk13Planning to Fail #phpuk13
Planning to Fail #phpuk13Dave Gardner
 
Getting out of the monolith hell
Getting out of the monolith hellGetting out of the monolith hell
Getting out of the monolith hellmimmozzo_
 
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 sourceTimothy Spann
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
Simple Solutions for Complex Problems
Simple Solutions for Complex ProblemsSimple Solutions for Complex Problems
Simple Solutions for Complex ProblemsTyler Treat
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Apcera
 
Phoenix for Rubyists
Phoenix for RubyistsPhoenix for Rubyists
Phoenix for RubyistsDoug Goldie
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsŁukasz Sowa
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stackJohan Edstrom
 
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 KubernetesJosef Adersberger
 
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 KubernetesQAware GmbH
 
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 Worldjhugg
 
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 ContainerJangseon Ryu
 
Become a Performance Diagnostics Hero
Become a Performance Diagnostics HeroBecome a Performance Diagnostics Hero
Become a Performance Diagnostics HeroTechWell
 
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_MicroservicesJason Varghese
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople
 

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

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 & LoggingMarian Marinov
 
Basic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsBasic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsMarian Marinov
 
Introduction and replication to DragonflyDB
Introduction and replication to DragonflyDBIntroduction and replication to DragonflyDB
Introduction and replication to DragonflyDBMarian Marinov
 
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 RabbitMQMarian Marinov
 
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 .pdfMarian Marinov
 
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 eraMarian Marinov
 
Improve your storage with bcachefs
Improve your storage with bcachefsImprove your storage with bcachefs
Improve your storage with bcachefsMarian Marinov
 
Control your service resources with systemd
 Control your service resources with systemd  Control your service resources with systemd
Control your service resources with systemd Marian Marinov
 
Comparison of-foss-distributed-storage
Comparison of-foss-distributed-storageComparison of-foss-distributed-storage
Comparison of-foss-distributed-storageMarian Marinov
 
Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?Marian Marinov
 
Securing your MySQL server
Securing your MySQL serverSecuring your MySQL server
Securing your MySQL serverMarian Marinov
 
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 DPDKMarian Marinov
 
Challenges with high density networks
Challenges with high density networksChallenges with high density networks
Challenges with high density networksMarian Marinov
 
SiteGround building automation
SiteGround building automationSiteGround building automation
SiteGround building automationMarian Marinov
 
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 trackingMarian Marinov
 
Managing a lot of servers
Managing a lot of serversManaging a lot of servers
Managing a lot of serversMarian Marinov
 
Let's Encrypt failures
Let's Encrypt failuresLet's Encrypt failures
Let's Encrypt failuresMarian Marinov
 
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 trackingMarian Marinov
 

More from Marian Marinov (20)

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
 
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
 

Recently uploaded

Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxachiever3003
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectssuserb6619e
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
Crushers to screens in aggregate production
Crushers to screens in aggregate productionCrushers to screens in aggregate production
Crushers to screens in aggregate productionChinnuNinan
 

Recently uploaded (20)

Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptx
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
Crushers to screens in aggregate production
Crushers to screens in aggregate productionCrushers to screens in aggregate production
Crushers to screens in aggregate production
 

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