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

PDF
Responsible Microservices
PPTX
Microservices and OSGi: Better together?
PDF
Migrate to Microservices Judiciously!
PDF
Decompose your monolith: Six principles for refactoring a monolith to microse...
PDF
Decompose your monolith: strategies for migrating to microservices (Tide)
PPTX
Elastically scalable architectures with microservices. The end of the monolith?
PPTX
Pragmatic Microservices
PDF
The Case Against Microservices
Responsible Microservices
Microservices and OSGi: Better together?
Migrate to Microservices Judiciously!
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: strategies for migrating to microservices (Tide)
Elastically scalable architectures with microservices. The end of the monolith?
Pragmatic Microservices
The Case Against Microservices

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

PPTX
Introduction to microservices
PDF
#DevNexus202 Decompose your monolith
PDF
Introduction to Microservices
PPTX
Software Architectures, Week 3 - Microservice-based Architectures
PDF
Escaping Monolothic Hell Escaping Monolothic Hell
PDF
Microservices: The Best Practices
PDF
Architecture tests: Setting a common standard
PDF
Using patterns and pattern languages to make better architectural decisions
PDF
A Decade of Microservices
PDF
Lowering the risk of monolith to microservices
PDF
DEVNET-1142 Decomposing Monolithic Applications to Microservices
PDF
Microservice Architecture
PDF
Monolithic vs microservice architecture Which is best suited for your busines...
PPTX
The "Why", "What" and "How" of Microservices
PDF
Monolithic vs Microservices Architecture: Choosing the Right Approach for You...
PDF
CARE –AN ARCHITECTURAL APPROACH FOR A MULTIMEDIA ASSISTANCE SYSTEM FOR SINGLE...
PDF
CARE –AN ARCHITECTURAL APPROACH FOR A MULTIMEDIA ASSISTANCE SYSTEM FOR SINGLE...
PDF
CARE –AN ARCHITECTURAL APPROACH FOR A MULTIMEDIA ASSISTANCE SYSTEM FOR SINGLE...
PDF
Reactive Microsystems The Evolution of Microservices at Scale First Edition J...
PPTX
Microservice intro
Introduction to microservices
#DevNexus202 Decompose your monolith
Introduction to Microservices
Software Architectures, Week 3 - Microservice-based Architectures
Escaping Monolothic Hell Escaping Monolothic Hell
Microservices: The Best Practices
Architecture tests: Setting a common standard
Using patterns and pattern languages to make better architectural decisions
A Decade of Microservices
Lowering the risk of monolith to microservices
DEVNET-1142 Decomposing Monolithic Applications to Microservices
Microservice Architecture
Monolithic vs microservice architecture Which is best suited for your busines...
The "Why", "What" and "How" of Microservices
Monolithic vs Microservices Architecture: Choosing the Right Approach for You...
CARE –AN ARCHITECTURAL APPROACH FOR A MULTIMEDIA ASSISTANCE SYSTEM FOR SINGLE...
CARE –AN ARCHITECTURAL APPROACH FOR A MULTIMEDIA ASSISTANCE SYSTEM FOR SINGLE...
CARE –AN ARCHITECTURAL APPROACH FOR A MULTIMEDIA ASSISTANCE SYSTEM FOR SINGLE...
Reactive Microsystems The Evolution of Microservices at Scale First Edition J...
Microservice intro
Ad

Recently uploaded (20)

PDF
Visual explanation of Dijkstra's Algorithm using Python
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
Computer Software - Technology and Livelihood Education
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PPTX
CNN LeNet5 Architecture: Neural Networks
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
Types of Token_ From Utility to Security.pdf
PDF
Time Tracking Features That Teams and Organizations Actually Need
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PPTX
assetexplorer- product-overview - presentation
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
Visual explanation of Dijkstra's Algorithm using Python
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Computer Software - Technology and Livelihood Education
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
How to Use SharePoint as an ISO-Compliant Document Management System
CNN LeNet5 Architecture: Neural Networks
Oracle Fusion HCM Cloud Demo for Beginners
Patient Appointment Booking in Odoo with online payment
Monitoring Stack: Grafana, Loki & Promtail
Types of Token_ From Utility to Security.pdf
Time Tracking Features That Teams and Organizations Actually Need
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
assetexplorer- product-overview - presentation
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Salesforce Agentforce AI Implementation.pdf
Designing Intelligence for the Shop Floor.pdf
GSA Content Generator Crack (2025 Latest)
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
How Tridens DevSecOps Ensures Compliance, Security, and Agility
Why Generative AI is the Future of Content, Code & Creativity?
Ad

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!