SlideShare a Scribd company logo
Monolithic to Microservices
Architecture
LAZO APOSTOLOVSKI
JAVA DEVELOPER @ TRICODE MACEDONIA
What is Monolithic Architecture?
Monolithic Architecture drawbacks?
● Huge code base
● Hard to manage
● Difficult Continuous Integration
● Difficult application Scaling
● And so on...
What are Microservices?
What are Microservices?
Microservices are
small,
focused,
autonomous
services that work together.
Benefits of Microservices
● Mixed Technology can be used
● That fits needs of that microservice.
● Resilience
● If one node fails, others continue to work and isolate the problem.
● Ease of Deployment
● On code change, only affected part can be redeployed faster.
● Composability
● Microservice can be used for different purposes, and from different applications.
● Replaceable
● Easier to replace, delete or rewrite is much easier on small functionality.
What Makes a Good Service?
3 things
What Makes a Good Service?
● Loose Coupling
● Whole point is to make changes to one service and deploy it.
● High Cohesion
● Related behavior is located on one place.
● Shared and hidden models
● Share only minimum information to customer, and hide internal
implementation.
From where to start?
Always start from
Monolith Application
and
split later.
Splitting the Monolith
Why to split the monolith?
Why to split the monolith?
● Code base is huge to manage
● Some part will change frequently
● We need to deploy new changes fast
● Some data need additional protection around
● Different technology should be used
Splitting is complex and will cost you a lot,
if you not do it right.
Where to start?
● From existing monolith
● Detect functionality boundaries
● Separate to modules first
● Extract as stand alone microservices
That is about code.
But what about database?
Splitting database
● Isolate data in separate tables first
● Break foreign key relations
● If all good move it to another database
● Extract code in microservice
● If fail merge it all back and rethink
Deal with...
● Static data (enumerations)
Copy or put it in configuration
● Shared data (different functionality use same data)
Can be separated as different microservice too
● Transactions (no transactions anymore)
Different ways to handle this. Try again later or abort everything.
T E S T I N G
Tests are important
TESTING
● Unit tests
Have a lot of them
● Acceptance tests
Check if its implemented like it should
● Performance tests
How system can handle the load
● Exploration tests
Finding the way to break the system
TESTING
● Service tests
Stub and mock external services
● Test service in isolation
● Test without user interface
● End-to-end tests
Testing all together
● Slow and tricky to manage
● Its hard to locate the problem
Developer's team write
tests by itself!
Testing microservice into production.
How to do it?
In production
all that go wrong
will go wrong.
Minimize the impact
with 2 basic approaches.
Minimize the impact
Blue / Green deployment.
Minimize the impact
Canary deployment
Microservices integration
Get it wrong, and disaster awaits.
Integration
tips.
Integration
Avoid braking changes!
Consumers should be able to use service until they are ready to switch.
Versioning
● Microservices are changing constantly
● Internal changes do not affect consumers.
● Changes should not prevent consumers use
service.
● Small changes and Breaking changes.
Dealing with small changes.
● New field is added
● Unused field is removed
● Consumer read only what is needed
● Use flexible technology JSON or XML.
Dealing with breaking changes
● Need to be avoided
● Support old version for a while
– Give consumers time to switch
● Two parallel service instance (easy way)
– Balance between them
● Expose both version under same instance
– Adding complexity need to be avoided
Integration
Make service simple for Consumers
Use common communication protocol. Json for example.
Integration
Hide internal implementation details
Consumers should not know what is happening inside microservice.
Integration
The Shared database
Integration
Interface the customer instead
Consumers should not know what is happening inside microservice.
Orchestration
and
Choreography
Orchestration and Choreography
● For example
When some event happen we need to:
1) Send confirmation email
2) Send order from warehouse
3) Update finance department
● This can be done on two ways.
Orchestration
● Synchronous tasks execution
● One microservice delegate execution
● If “mastermind” service fails, all process stops
● Its slow
● Easier to guarantee consistency
Choreography
● Asynchronous tasks execution
● Every microservice is responsible for his job
● Its faster because all executions are parallel
● If some microservice fails others will complete
● Additional retry mechanisms
Microservices monitoring
Why we need it?
Microservices monitoring
● Single service, Single Server
Nagios is your friend
Microservices monitoring
● Single service, Multiple Servers
Nagios + Logstash for logs aggregation
Microservices monitoring
● Multiple services, Multiple Servers
Nagios + Logstash + Kibana for visual monitoring
Metrics can help a lot
● What hardware we need
How much resources we need for one service instance to run
● Do we need new host
If old one cannot provide us with enough power
● When we need to scale
Scale only in peak times
● How much we need to scale
Scale just enough to serve clients
Tools
● Graphite, Kibana, Varnish
System security
SSO (Single-Sign-On)
Service to service Authentication
● Allow everything inside perimeter
If attacker penetrate the security, all services are vulnerable
● HTTP(S) basic protocol between services.
Communication between services also need to be secured.
● Client certificates
Hard to manage, good data encryption
● API Keys
Shared public key between
● HMAC
Guaranties integrity of request
Database protection
● Encrypt database data
Encrypted data is useless for attacker
● Some database offer integrated encryption
Encrypt sensitive data in database
● AES, DSC
Good algorithms to use
Other protection inside perimeter
● Firewall
Block suspicious requests
● Intrusion detection
Monitor for suspicious activity
● Network segregation
Separate sensitive data in separate network
● Operating system
Apply security Patch regularly
Monolithic to Microservices Architecture - STM 6
This topic is huge,
but this is all for now.
Any questions?

More Related Content

What's hot (20)

PPTX
Microservice-based Architecture on the Salesforce App Cloud
pbattisson
 
PPTX
Microservices Architecture
Kanushka Gayan
 
PPTX
Understanding Microservice Architecture WSO2Con Asia 2016
Sagara Gunathunga
 
PDF
Perimeter Protected Access Design Pattern
Mike Reams
 
PDF
Microservice Architecture 101
Kochih Wu
 
PDF
APIDays 2018 - APIOps & Microservices - What is MICRO by the Way ?
FABERNOVEL TECHNOLOGIES
 
PPTX
Microservice architecture design principles
Sanjoy Kumar Roy
 
ODP
Microservice Architecture JavaCro 2015
Nenad Pecanac
 
PDF
Microservices architecture
Mohammad Dameer
 
PPT
Securing elastic applications_on_mobile_devices
firzhan naqash
 
PPT
Presentation cloud computing
Akash Pandey
 
PPTX
Microservices-101
Subhashish Bhattacharjee
 
PDF
Microservices architecture
Abdelghani Azri
 
PDF
Ato Z of Microservices Architecture by Systango
Systango
 
PDF
Microservice
Viney Shih
 
PPTX
Micro Services Architecture
Rabbani Mohideen
 
PDF
Modularity by Microservices
Andrei Rugina
 
PDF
بالعربي التطور في البرمجة باستخدام ال .Net
Mohamed Galal
 
PPTX
07 advanced topics
Bat Programmer
 
PDF
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
WSO2
 
Microservice-based Architecture on the Salesforce App Cloud
pbattisson
 
Microservices Architecture
Kanushka Gayan
 
Understanding Microservice Architecture WSO2Con Asia 2016
Sagara Gunathunga
 
Perimeter Protected Access Design Pattern
Mike Reams
 
Microservice Architecture 101
Kochih Wu
 
APIDays 2018 - APIOps & Microservices - What is MICRO by the Way ?
FABERNOVEL TECHNOLOGIES
 
Microservice architecture design principles
Sanjoy Kumar Roy
 
Microservice Architecture JavaCro 2015
Nenad Pecanac
 
Microservices architecture
Mohammad Dameer
 
Securing elastic applications_on_mobile_devices
firzhan naqash
 
Presentation cloud computing
Akash Pandey
 
Microservices-101
Subhashish Bhattacharjee
 
Microservices architecture
Abdelghani Azri
 
Ato Z of Microservices Architecture by Systango
Systango
 
Microservice
Viney Shih
 
Micro Services Architecture
Rabbani Mohideen
 
Modularity by Microservices
Andrei Rugina
 
بالعربي التطور في البرمجة باستخدام ال .Net
Mohamed Galal
 
07 advanced topics
Bat Programmer
 
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
WSO2
 

Viewers also liked (20)

PDF
Porn, the leading influencer of Technology
Tricode (part of Dept)
 
PDF
Customers speak on Magnolia CMS
Tricode (part of Dept)
 
PDF
Introducing: Tricode's Software Factory
Tricode (part of Dept)
 
PDF
Internet Addiction (Social Media Edition)
Tricode (part of Dept)
 
PDF
How Technology is Affecting Society - STM 6
Tricode (part of Dept)
 
PPTX
Kids Can Code - an interactive IT workshop
Tricode (part of Dept)
 
PDF
De 4 belangrijkste risicofactoren van het nearshoring proces
Tricode (part of Dept)
 
PPTX
RESTful API - Best Practices
Tricode (part of Dept)
 
PDF
Intro to JHipster
Tricode (part of Dept)
 
PDF
Communication and its Importance to a Developer
Tricode (part of Dept)
 
PDF
Offshoring: Top 10 verborgen kosten
Tricode (part of Dept)
 
PDF
Slide empr
Floriana Tudico
 
PDF
Quality Nearshoring met Tricode
Tricode (part of Dept)
 
PDF
Dipping Your Toes Into Cloud Native Application Development
Matthew Farina
 
PDF
Micro Services - Small is Beautiful
Eberhard Wolff
 
PDF
Deep Learning - STM 6
Tricode (part of Dept)
 
PDF
Modernizing Your Enterprise Application Architecture with Microservices and A...
andreas kuncoro
 
PDF
Scaling micro services at gilt
Adrian Trenaman
 
PDF
Micro Services - Smaller is Better?
Eberhard Wolff
 
PDF
AppSphere 15 - Manage your Microservices with Red Hat OpenShift and AppDynamics
AppDynamics
 
Porn, the leading influencer of Technology
Tricode (part of Dept)
 
Customers speak on Magnolia CMS
Tricode (part of Dept)
 
Introducing: Tricode's Software Factory
Tricode (part of Dept)
 
Internet Addiction (Social Media Edition)
Tricode (part of Dept)
 
How Technology is Affecting Society - STM 6
Tricode (part of Dept)
 
Kids Can Code - an interactive IT workshop
Tricode (part of Dept)
 
De 4 belangrijkste risicofactoren van het nearshoring proces
Tricode (part of Dept)
 
RESTful API - Best Practices
Tricode (part of Dept)
 
Intro to JHipster
Tricode (part of Dept)
 
Communication and its Importance to a Developer
Tricode (part of Dept)
 
Offshoring: Top 10 verborgen kosten
Tricode (part of Dept)
 
Slide empr
Floriana Tudico
 
Quality Nearshoring met Tricode
Tricode (part of Dept)
 
Dipping Your Toes Into Cloud Native Application Development
Matthew Farina
 
Micro Services - Small is Beautiful
Eberhard Wolff
 
Deep Learning - STM 6
Tricode (part of Dept)
 
Modernizing Your Enterprise Application Architecture with Microservices and A...
andreas kuncoro
 
Scaling micro services at gilt
Adrian Trenaman
 
Micro Services - Smaller is Better?
Eberhard Wolff
 
AppSphere 15 - Manage your Microservices with Red Hat OpenShift and AppDynamics
AppDynamics
 
Ad

Similar to Monolithic to Microservices Architecture - STM 6 (20)

PPTX
Ledingkart Meetup #1: Monolithic to microservices in action
Mukesh Singh
 
ODP
micro services architecture (FrosCon2014)
smancke
 
PDF
Microservices Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
PDF
Building Microservices Software practics
muhammed84essa
 
PPTX
Microservices vs monolithics betabeers
Jesús Mª Villar Vazquez
 
PDF
Everything you want to know about microservices
Youness Lasmak
 
PPTX
Think Small To Go Big - Introduction To Microservices
Ryan Baxter
 
PDF
Microservices: Where do they fit within a rapidly evolving integration archit...
Kim Clark
 
PDF
How to grow your own Microservice?
Dmitry Buzdin
 
PPTX
Microservices
Rajesh Kumar
 
PDF
Microservices for Mortals
Bert Ertman
 
PDF
Microservices Architecture
Srinivasan Nanduri
 
PDF
Building microservices on azure
Vaibhav Gujral
 
PPTX
05 microservices microdeck
fenggang wang
 
PPTX
Introduction to Microservices
MahmoudZidan41
 
PPTX
Introduction to microservices
Anil Allewar
 
PDF
Why Microservice
Kelvin Yeung
 
PDF
Microservices for java architects it-symposium-2015-09-15
Derek Ashmore
 
PDF
Microservice Architecture
Engin Yoeyen
 
PDF
Writing microservices in Java -- Chicago-2015-11-10
Derek Ashmore
 
Ledingkart Meetup #1: Monolithic to microservices in action
Mukesh Singh
 
micro services architecture (FrosCon2014)
smancke
 
Microservices Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Building Microservices Software practics
muhammed84essa
 
Microservices vs monolithics betabeers
Jesús Mª Villar Vazquez
 
Everything you want to know about microservices
Youness Lasmak
 
Think Small To Go Big - Introduction To Microservices
Ryan Baxter
 
Microservices: Where do they fit within a rapidly evolving integration archit...
Kim Clark
 
How to grow your own Microservice?
Dmitry Buzdin
 
Microservices
Rajesh Kumar
 
Microservices for Mortals
Bert Ertman
 
Microservices Architecture
Srinivasan Nanduri
 
Building microservices on azure
Vaibhav Gujral
 
05 microservices microdeck
fenggang wang
 
Introduction to Microservices
MahmoudZidan41
 
Introduction to microservices
Anil Allewar
 
Why Microservice
Kelvin Yeung
 
Microservices for java architects it-symposium-2015-09-15
Derek Ashmore
 
Microservice Architecture
Engin Yoeyen
 
Writing microservices in Java -- Chicago-2015-11-10
Derek Ashmore
 
Ad

More from Tricode (part of Dept) (17)

PDF
The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
Tricode (part of Dept)
 
PPTX
Agile QA 2017: A New Hope
Tricode (part of Dept)
 
PDF
Mobile Sensor Networks based on Smartphone devices and Web Services
Tricode (part of Dept)
 
PPTX
Keeping Your Clients Happy and Your Management Even Happier
Tricode (part of Dept)
 
PDF
AEM Digital Assets Management - What's new in 6.2?
Tricode (part of Dept)
 
PDF
10 nearshoring it trends om in 2016 te volgen
Tricode (part of Dept)
 
PDF
Tricode & Magnolia
Tricode (part of Dept)
 
PDF
Why you should use Adobe Experience Manager Mobile
Tricode (part of Dept)
 
PDF
Little Brother Is Watching You
Tricode (part of Dept)
 
PDF
12 hot features to engage and save time with aem 6.2
Tricode (part of Dept)
 
PDF
Tricode = Career + Fun
Tricode (part of Dept)
 
PPT
Content Marketing: How to Create Relevant Content for Your Audience
Tricode (part of Dept)
 
PDF
Provisioning aem with puppet
Tricode (part of Dept)
 
PDF
Adobe Experience Manager - The hub within the Marketing Cloud
Tricode (part of Dept)
 
PPTX
Continuous Delivery for Open Source Java projects
Tricode (part of Dept)
 
PPTX
Intro to OSGi
Tricode (part of Dept)
 
PDF
Online marketing trends 2016
Tricode (part of Dept)
 
The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
Tricode (part of Dept)
 
Agile QA 2017: A New Hope
Tricode (part of Dept)
 
Mobile Sensor Networks based on Smartphone devices and Web Services
Tricode (part of Dept)
 
Keeping Your Clients Happy and Your Management Even Happier
Tricode (part of Dept)
 
AEM Digital Assets Management - What's new in 6.2?
Tricode (part of Dept)
 
10 nearshoring it trends om in 2016 te volgen
Tricode (part of Dept)
 
Tricode & Magnolia
Tricode (part of Dept)
 
Why you should use Adobe Experience Manager Mobile
Tricode (part of Dept)
 
Little Brother Is Watching You
Tricode (part of Dept)
 
12 hot features to engage and save time with aem 6.2
Tricode (part of Dept)
 
Tricode = Career + Fun
Tricode (part of Dept)
 
Content Marketing: How to Create Relevant Content for Your Audience
Tricode (part of Dept)
 
Provisioning aem with puppet
Tricode (part of Dept)
 
Adobe Experience Manager - The hub within the Marketing Cloud
Tricode (part of Dept)
 
Continuous Delivery for Open Source Java projects
Tricode (part of Dept)
 
Intro to OSGi
Tricode (part of Dept)
 
Online marketing trends 2016
Tricode (part of Dept)
 

Recently uploaded (20)

PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Digital Circuits, important subject in CS
contactparinay1
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

Monolithic to Microservices Architecture - STM 6