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)

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

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 

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