SlideShare a Scribd company logo
1 of 26
Isn’t the Monolith Just Enough?
Petru Flueras
Software Architect - Visma Software
@pflueras
Codecamp, April 2022
Thank you!
Journey: follow the lifecycle of a project starting from the
startup/inception phase all the way to a matured product
Would you go microservices architecture from the very beginning?
Monolith First
Most successful microservice stories have started with a monolith
Products started as a microservice system from scratch, ended up in a
serious trouble
It may be hard to scale a poorly designed but successful software
system, but that's still a better place to be than its inverse
source: https://martinfowler.com/bliki/MonolithFirst.html
Monolith First #2
You shouldn't start a new project with microservices, even if you're
sure your application will be big enough to make it worthwhile
source: https://martinfowler.com/bliki/MonolithFirst.html
Design of the monolith
Modularization: strong encapsulation, well-defined
interfaces, explicit dependencies between modules
(stable boundaries between modules)
Simon Brown: if you can’t build a well-structured
monolith, what makes you think microservices is the
answer?
Modularization done right
As project grows, don’t use layers (e.g.
presentation-domain-data) as the top level
modules, instead make you top level
(domain oriented) modules be full-stack
which are internally layered
https://martinfowler.com/bliki/PresentationDomainDataLayering.html
Make each program to do one thing well. To do a new job, build afresh rather
than complicate old programs by adding new “features”
UNIX Time-Sharing System: Forward (Douglas McIlroy - 1978)
Bounded Context (Domain Driven Design): a way to mark boundaries and
relationships between different domain models
It is almost always incorrect to begin the decomposition of a system into modules on
the basis of a flowchart. Instead, each module is designed to hide difficult design
decisions.
On the Criteria To Be Used in Decomposing Systems into Modules (1972)
How to get the right shaped modules?
Before migrating to Microservices: More Complexity?
Image: https://www.n-ix.com/microservices-vs-monolith-which-architecture-best-choice-your-business/
Complexity #1: Data Consistency
Database transactions (ACID), Referential integrity
Monolith
Eventual consistency (BASE), Distributed transactions - 2PC,
SAGA Pattern
Microservices
Complexity #2: Network fallacies
1. The network is reliable.
2. Latency is zero.
3. Bandwidth is infinite.
4. The network is secure.
5. Topology doesn't change.
6. There is one administrator.
7. Transport cost is zero.
8. The network is homogeneous.
Complexity #3: CI & CD
Monolith
Microservices
Complexity #4: Monitoring
Monolith Microservices
Complexity #5: Integration Testing
Complexity #6: Security
● Authentication: some sort of single sign-on (SSO)
○ End users
■ Single sign-on gateway & identity provider
■ OpenID Connect
○ Service-to-service
■ Basic Auth, OpenID Connect, Client certificates, API keys
■ Service accounts
● Attack surface area is increased
● Don’t repeat yourself
https://martinfowler.com/bliki/MicroservicePrerequisites.html
The Seven (More) Deadly Sins of Microservices (Daniel Bryant)
Microservices Highway to hell (Broutin Mathieu)
Avoiding Microservice Megadisasters (Jimmy Bogard)
Conscious decision!
(Customers don’t care about your tech stack)
● Scalability: independently scalable microservices
○ Time and cost efficient (auto)scaling
○ Fast startup time & low memory footprint
○ CPU / memory intensive applications
● Autonomous teams
● Deliver faster business value (slow CI/CD pipelines)
● DevEx is bad - hard to maintain
Why migrating to Microservices?
How small can a microservice be?
How big a monolith can go?
Scaling #1: Horizontal scaling (stateless)
Scaling #2: Database read replica
Scaling #3: Data partitioning - Sharding (Z axis)
Modular monolith!
Summary
Level 1: Monolith First & The right design!
Level 2: Horizontal scaling
Level 3: Database read replica
Level 4: Database sharding
Level 5: Microservices - conscious decision!
Isn't the Monolith Just Enough?

More Related Content

Similar to Isn't the Monolith Just Enough?

Dublin Microservice "Introduction to Service Meshes"
Dublin Microservice "Introduction to Service Meshes"Dublin Microservice "Introduction to Service Meshes"
Dublin Microservice "Introduction to Service Meshes"Daniel Bryant
 
NextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
NextStep Boston 2018 - Monoliths or Microservices, Francisco MenezesNextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
NextStep Boston 2018 - Monoliths or Microservices, Francisco MenezesOutSystems
 
Migrating to Microservices Patterns and Technologies (edition 2023)
 Migrating to Microservices Patterns and Technologies (edition 2023) Migrating to Microservices Patterns and Technologies (edition 2023)
Migrating to Microservices Patterns and Technologies (edition 2023)Ahmed Misbah
 
Istio as an Enabler for Migrating Monolithic Applications to Microservices v1.3
Istio as an Enabler for Migrating Monolithic Applications to Microservices v1.3Istio as an Enabler for Migrating Monolithic Applications to Microservices v1.3
Istio as an Enabler for Migrating Monolithic Applications to Microservices v1.3Ahmed Misbah
 
Will Microservices Die.pdf
Will Microservices Die.pdfWill Microservices Die.pdf
Will Microservices Die.pdfRichHagarty
 
Microservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterMicroservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterAlexander Arda
 
Lock-in issues with PaaS
Lock-in issues with PaaSLock-in issues with PaaS
Lock-in issues with PaaSFederico Conte
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.itGiuseppe Lavagetto
 
A Tale of Contemporary Software
A Tale of Contemporary SoftwareA Tale of Contemporary Software
A Tale of Contemporary SoftwareYun Zhi Lin
 
Best Practices to Secure Containerized Apps with Next-Gen WAF
Best Practices to Secure Containerized Apps with Next-Gen WAFBest Practices to Secure Containerized Apps with Next-Gen WAF
Best Practices to Secure Containerized Apps with Next-Gen WAFDevOps.com
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Dismantling the Monolith: Scaling with Microservices
Dismantling the Monolith: Scaling with MicroservicesDismantling the Monolith: Scaling with Microservices
Dismantling the Monolith: Scaling with MicroservicesOKL Engineering
 
Blockchain Technology In IOT
Blockchain Technology In IOTBlockchain Technology In IOT
Blockchain Technology In IOTStacey Roberts
 
What is monolithic architecture.pptx
What is monolithic architecture.pptxWhat is monolithic architecture.pptx
What is monolithic architecture.pptxShantanuApurva1
 
Micro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMicro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMohamedElGohary71
 
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...apidays
 
Microservice pitfalls
Microservice pitfalls Microservice pitfalls
Microservice pitfalls Mite Mitreski
 
Monoliths, Myths, and Microservices - CfgMgmtCamp
Monoliths, Myths, and Microservices - CfgMgmtCampMonoliths, Myths, and Microservices - CfgMgmtCamp
Monoliths, Myths, and Microservices - CfgMgmtCampMichael Ducy
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREAraf Karsh Hamid
 
The Rise of Microservices
The Rise of MicroservicesThe Rise of Microservices
The Rise of MicroservicesMongoDB
 

Similar to Isn't the Monolith Just Enough? (20)

Dublin Microservice "Introduction to Service Meshes"
Dublin Microservice "Introduction to Service Meshes"Dublin Microservice "Introduction to Service Meshes"
Dublin Microservice "Introduction to Service Meshes"
 
NextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
NextStep Boston 2018 - Monoliths or Microservices, Francisco MenezesNextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
NextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
 
Migrating to Microservices Patterns and Technologies (edition 2023)
 Migrating to Microservices Patterns and Technologies (edition 2023) Migrating to Microservices Patterns and Technologies (edition 2023)
Migrating to Microservices Patterns and Technologies (edition 2023)
 
Istio as an Enabler for Migrating Monolithic Applications to Microservices v1.3
Istio as an Enabler for Migrating Monolithic Applications to Microservices v1.3Istio as an Enabler for Migrating Monolithic Applications to Microservices v1.3
Istio as an Enabler for Migrating Monolithic Applications to Microservices v1.3
 
Will Microservices Die.pdf
Will Microservices Die.pdfWill Microservices Die.pdf
Will Microservices Die.pdf
 
Microservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterMicroservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They Matter
 
Lock-in issues with PaaS
Lock-in issues with PaaSLock-in issues with PaaS
Lock-in issues with PaaS
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.it
 
A Tale of Contemporary Software
A Tale of Contemporary SoftwareA Tale of Contemporary Software
A Tale of Contemporary Software
 
Best Practices to Secure Containerized Apps with Next-Gen WAF
Best Practices to Secure Containerized Apps with Next-Gen WAFBest Practices to Secure Containerized Apps with Next-Gen WAF
Best Practices to Secure Containerized Apps with Next-Gen WAF
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Dismantling the Monolith: Scaling with Microservices
Dismantling the Monolith: Scaling with MicroservicesDismantling the Monolith: Scaling with Microservices
Dismantling the Monolith: Scaling with Microservices
 
Blockchain Technology In IOT
Blockchain Technology In IOTBlockchain Technology In IOT
Blockchain Technology In IOT
 
What is monolithic architecture.pptx
What is monolithic architecture.pptxWhat is monolithic architecture.pptx
What is monolithic architecture.pptx
 
Micro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMicro services vs Monolith Architecture
Micro services vs Monolith Architecture
 
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
 
Microservice pitfalls
Microservice pitfalls Microservice pitfalls
Microservice pitfalls
 
Monoliths, Myths, and Microservices - CfgMgmtCamp
Monoliths, Myths, and Microservices - CfgMgmtCampMonoliths, Myths, and Microservices - CfgMgmtCamp
Monoliths, Myths, and Microservices - CfgMgmtCamp
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
The Rise of Microservices
The Rise of MicroservicesThe Rise of Microservices
The Rise of Microservices
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 

Isn't the Monolith Just Enough?

  • 1. Isn’t the Monolith Just Enough? Petru Flueras Software Architect - Visma Software @pflueras Codecamp, April 2022
  • 3. Journey: follow the lifecycle of a project starting from the startup/inception phase all the way to a matured product Would you go microservices architecture from the very beginning?
  • 4. Monolith First Most successful microservice stories have started with a monolith Products started as a microservice system from scratch, ended up in a serious trouble It may be hard to scale a poorly designed but successful software system, but that's still a better place to be than its inverse source: https://martinfowler.com/bliki/MonolithFirst.html
  • 5. Monolith First #2 You shouldn't start a new project with microservices, even if you're sure your application will be big enough to make it worthwhile source: https://martinfowler.com/bliki/MonolithFirst.html
  • 6. Design of the monolith Modularization: strong encapsulation, well-defined interfaces, explicit dependencies between modules (stable boundaries between modules) Simon Brown: if you can’t build a well-structured monolith, what makes you think microservices is the answer?
  • 7. Modularization done right As project grows, don’t use layers (e.g. presentation-domain-data) as the top level modules, instead make you top level (domain oriented) modules be full-stack which are internally layered https://martinfowler.com/bliki/PresentationDomainDataLayering.html
  • 8. Make each program to do one thing well. To do a new job, build afresh rather than complicate old programs by adding new “features” UNIX Time-Sharing System: Forward (Douglas McIlroy - 1978) Bounded Context (Domain Driven Design): a way to mark boundaries and relationships between different domain models It is almost always incorrect to begin the decomposition of a system into modules on the basis of a flowchart. Instead, each module is designed to hide difficult design decisions. On the Criteria To Be Used in Decomposing Systems into Modules (1972) How to get the right shaped modules?
  • 9. Before migrating to Microservices: More Complexity? Image: https://www.n-ix.com/microservices-vs-monolith-which-architecture-best-choice-your-business/
  • 10. Complexity #1: Data Consistency Database transactions (ACID), Referential integrity Monolith Eventual consistency (BASE), Distributed transactions - 2PC, SAGA Pattern Microservices
  • 11. Complexity #2: Network fallacies 1. The network is reliable. 2. Latency is zero. 3. Bandwidth is infinite. 4. The network is secure. 5. Topology doesn't change. 6. There is one administrator. 7. Transport cost is zero. 8. The network is homogeneous.
  • 12. Complexity #3: CI & CD Monolith Microservices
  • 15. Complexity #6: Security ● Authentication: some sort of single sign-on (SSO) ○ End users ■ Single sign-on gateway & identity provider ■ OpenID Connect ○ Service-to-service ■ Basic Auth, OpenID Connect, Client certificates, API keys ■ Service accounts ● Attack surface area is increased ● Don’t repeat yourself
  • 17. The Seven (More) Deadly Sins of Microservices (Daniel Bryant) Microservices Highway to hell (Broutin Mathieu) Avoiding Microservice Megadisasters (Jimmy Bogard)
  • 18. Conscious decision! (Customers don’t care about your tech stack)
  • 19. ● Scalability: independently scalable microservices ○ Time and cost efficient (auto)scaling ○ Fast startup time & low memory footprint ○ CPU / memory intensive applications ● Autonomous teams ● Deliver faster business value (slow CI/CD pipelines) ● DevEx is bad - hard to maintain Why migrating to Microservices?
  • 20. How small can a microservice be? How big a monolith can go?
  • 21. Scaling #1: Horizontal scaling (stateless)
  • 22. Scaling #2: Database read replica
  • 23. Scaling #3: Data partitioning - Sharding (Z axis)
  • 25. Summary Level 1: Monolith First & The right design! Level 2: Horizontal scaling Level 3: Database read replica Level 4: Database sharding Level 5: Microservices - conscious decision!