SlideShare a Scribd company logo
1 of 27
Introduction to Microservices
Agenda
• Monolithic Vs Microservices
• What and why Microservices?
• Microservices Advantages
• 12 Factor App
VS
monolithic microservices
Criteria
• Maintainability
• How easy is it to maintain
the code?
• How easy is it to fix a bug?
• Monitoring
• How easy is it to monitor
solution health?
• Scalability
• How easy is it to add new
computin power and
handle heavier load?
• Updates
• How easy is it to update
solution to the newest
version?
• Onboarding
• How easy is it to get
onboard a new team
member?
Monolithic?
- Application is built as a single unit.
- Components are interconnected and dependent on each ot
- Deploy all the app incase of any small change.
- Application is too large and complex to understand.
- Impact of any change is very high because it lead to test the
- If specific feature not working, the entire system goes dow
- Difficult to use new technology stack.
- Can’t scale specific component independently, entire app
A monolithic architecture is a model of software
structure that is created as one piece.
Microservices?
- Micro-service architecture is an approach to developing
- Each service is self contained and loosely coupled.
- Each service implement single business domain.
In other words, these services are small, highly decou
Advantages
- Better testability.
- Easier to build, maintain and enhance the micro-servi
- Better team organization.
- Independent deployment.
- Better fault isolation (failure in one service does not impac
- Flexibility in using technologies.
- Easy to understand since they represent a small piece of fu
- Better scalability.
VS
monolith microservices
12 Factor App
What and why?
What is 12 factor App?
- The 12-factor app methodology specifically created for building scala
- This is derived by Heroku.
- Read More @http://12factor.net/
Why 12 factor App?
- Good code fails if you don’t have a process, complexity increase if yo
1-Codebase
- One code base many deploys (deploy is running instance of the
app).
- Single root repo , don’t share your code with another app.
- Shared code between multiple apps should be separated in
another codebase.
2-Dependencies
- Explicitly declare and isolate dependencies.
- Never relies on implicit existence of system packages.
- All app dependencies should be declared in dependency declaration m
- Dependency declaration manifest in PHP is composer.json
And the dependency management tool is Composer.
- Twelve-factor apps also do not rely on the implicit existence of any sys
3-Config
- Config is everything that vary between deploys(dev, stage, production
- Config belongs to the environment not the App.
- Config should be stored in the environment variables.
- Apps sometimes store config as constants in the code. This is a violatio
- You should can make your app open source at any moment without co
4-Backing Services
- Any service the app consumes over the network as part of its normal o
- Examples: messaging/queueing systems, Database store, cache system
- Treat backing services as attached resources.
- Should be accessed via URL in the config.
- Make no distinct between local and third parity services.
- A deploy of the twelve-factor app should be able to swap out a local M
5-Build, release, run
- A codebase is transformed into a deployment in 3 stages:
1-Build: convert the code to executable bundle known as build
(In Golang build results binary executeble file)
2-Release:take the build and combines it with deploy config.
3- Run : runs the app in the execution environment (also known as “run
6-Processes
- Processes should be stateless and share no thing.
- Any data that needs to persist must be stored in a stateful baking serv
- For example, downloading a large file, operating on it, and storing the
- Session are a violation of twelve-factor.
7-Port Binding
- Export services via port binding.
- One app can become a backing service for another app.
8-Concurrency
- There are two types of scaling vertical )adding more resources( and h
- You should be able to scale out(horizontally) and distribute the load b
9-Disposability
- Your app should be quick to Strat up and graceful to shout down.
- Quick to start up means app ideally take few seconds to startup.
- Graceful to shut down means when the app receive a SIGTERM (term
- If server die we should replace it and start another one quickly.
10-Dev/prod parity
- Keep dev, stage and production as similar as possible.
- Historically, there have been substantial gaps between development a
- • Make the personnel gap small: developers who wrote code are closely involved in deploying it and w
• Make the tools gap small: keep development and production as sim
11-Logs
- Logs provide visibility into the behavior of a running app.
- Treat logs as event streams.
- It should not attempt to write to or manage log files. Instead, each ru
- each process stream will be captured by the execution environment, a
12-Admin processes
- Admin processes such as db migration and cron jobs should be run a
- Run in another container (not the same container that handles user r
Any questions ?

More Related Content

What's hot

What's hot (20)

Sprinting with Anypoint Runtime Fabric
Sprinting with Anypoint Runtime FabricSprinting with Anypoint Runtime Fabric
Sprinting with Anypoint Runtime Fabric
 
Ahmedabad MuleSoft Meetup #5
Ahmedabad MuleSoft Meetup #5 Ahmedabad MuleSoft Meetup #5
Ahmedabad MuleSoft Meetup #5
 
MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019
 
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom ConnectorsHow to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
 
Special MuleSoft Meetup at London CONNECT
Special MuleSoft Meetup at London CONNECTSpecial MuleSoft Meetup at London CONNECT
Special MuleSoft Meetup at London CONNECT
 
Warsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime FabricWarsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime Fabric
 
MuleSoft Online Meetup a Guide to RTF application deployment - October 2020
MuleSoft Online Meetup   a Guide to RTF application deployment  - October 2020MuleSoft Online Meetup   a Guide to RTF application deployment  - October 2020
MuleSoft Online Meetup a Guide to RTF application deployment - October 2020
 
Warsaw MuleSoft Meetup #7 - custom policy
Warsaw MuleSoft Meetup #7 - custom policyWarsaw MuleSoft Meetup #7 - custom policy
Warsaw MuleSoft Meetup #7 - custom policy
 
On prem to cloud hub migration (updated)
On prem to cloud hub migration (updated)On prem to cloud hub migration (updated)
On prem to cloud hub migration (updated)
 
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
 
MuleSoft Online meetup - An expert's guide to Runtime fabric - August 2020
MuleSoft Online meetup -  An expert's guide to Runtime fabric - August 2020MuleSoft Online meetup -  An expert's guide to Runtime fabric - August 2020
MuleSoft Online meetup - An expert's guide to Runtime fabric - August 2020
 
Error Handling in Mulesoft
Error Handling in MulesoftError Handling in Mulesoft
Error Handling in Mulesoft
 
The Twelve Factor Apps
The Twelve Factor AppsThe Twelve Factor Apps
The Twelve Factor Apps
 
MuleSoft London Community November 2019 - MuleSoft and CICD
MuleSoft London Community November 2019 - MuleSoft and CICDMuleSoft London Community November 2019 - MuleSoft and CICD
MuleSoft London Community November 2019 - MuleSoft and CICD
 
Mule meetup Hyderabad
Mule meetup HyderabadMule meetup Hyderabad
Mule meetup Hyderabad
 
Meta Infrastructure as Code: How Capital One Automated Our Automation Tools w...
Meta Infrastructure as Code: How Capital One Automated Our Automation Tools w...Meta Infrastructure as Code: How Capital One Automated Our Automation Tools w...
Meta Infrastructure as Code: How Capital One Automated Our Automation Tools w...
 
OpenStack: Upstream First
OpenStack: Upstream FirstOpenStack: Upstream First
OpenStack: Upstream First
 
Software Deployment, Maintenance & Evolution
Software Deployment, Maintenance & EvolutionSoftware Deployment, Maintenance & Evolution
Software Deployment, Maintenance & Evolution
 
How to Secure Mule API's With a Demo
How to Secure Mule API's With a DemoHow to Secure Mule API's With a Demo
How to Secure Mule API's With a Demo
 
Introducing Mule Application and API
Introducing Mule Application and APIIntroducing Mule Application and API
Introducing Mule Application and API
 

Similar to Microservices

Similar to Microservices (20)

Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for Change
 
Twelve factor apps
Twelve factor appsTwelve factor apps
Twelve factor apps
 
Twelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring FrameworkTwelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring Framework
 
12-Factor Apps
12-Factor Apps12-Factor Apps
12-Factor Apps
 
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
 
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
Monolithic and Microservice architecture, Feature of Node JS 10, HTTP2
 
The Twelve Factor App
The Twelve Factor AppThe Twelve Factor App
The Twelve Factor App
 
12 factor app - Core Guidelines To Cloud Ready Solutions
12 factor app - Core Guidelines To Cloud Ready Solutions12 factor app - Core Guidelines To Cloud Ready Solutions
12 factor app - Core Guidelines To Cloud Ready Solutions
 
Twelve Factor App With Lagom
Twelve Factor App With LagomTwelve Factor App With Lagom
Twelve Factor App With Lagom
 
Automation for the Humans
Automation for the HumansAutomation for the Humans
Automation for the Humans
 
A DevOps adoption playbook- achieving business value at scale
A DevOps adoption playbook- achieving business value at scaleA DevOps adoption playbook- achieving business value at scale
A DevOps adoption playbook- achieving business value at scale
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On
 
HLayer / Cloud Native Best Practices
HLayer / Cloud Native Best PracticesHLayer / Cloud Native Best Practices
HLayer / Cloud Native Best Practices
 
June 2014 HUG - Continuuity Loom : Cluster Management
June 2014 HUG - Continuuity Loom : Cluster ManagementJune 2014 HUG - Continuuity Loom : Cluster Management
June 2014 HUG - Continuuity Loom : Cluster Management
 
Software application architecture
Software application architectureSoftware application architecture
Software application architecture
 
Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021
 
Yuriy Chapran - Building microservices.
Yuriy Chapran - Building microservices.Yuriy Chapran - Building microservices.
Yuriy Chapran - Building microservices.
 
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications
Cloud-Native Fundamentals: An Introduction to 12-Factor ApplicationsCloud-Native Fundamentals: An Introduction to 12-Factor Applications
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications
 

Recently uploaded

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 

Microservices

  • 2. Agenda • Monolithic Vs Microservices • What and why Microservices? • Microservices Advantages • 12 Factor App
  • 4. Criteria • Maintainability • How easy is it to maintain the code? • How easy is it to fix a bug? • Monitoring • How easy is it to monitor solution health? • Scalability • How easy is it to add new computin power and handle heavier load? • Updates • How easy is it to update solution to the newest version? • Onboarding • How easy is it to get onboard a new team member?
  • 6. - Application is built as a single unit. - Components are interconnected and dependent on each ot - Deploy all the app incase of any small change. - Application is too large and complex to understand. - Impact of any change is very high because it lead to test the - If specific feature not working, the entire system goes dow - Difficult to use new technology stack. - Can’t scale specific component independently, entire app A monolithic architecture is a model of software structure that is created as one piece.
  • 8. - Micro-service architecture is an approach to developing - Each service is self contained and loosely coupled. - Each service implement single business domain. In other words, these services are small, highly decou
  • 10. - Better testability. - Easier to build, maintain and enhance the micro-servi - Better team organization. - Independent deployment. - Better fault isolation (failure in one service does not impac - Flexibility in using technologies. - Easy to understand since they represent a small piece of fu - Better scalability.
  • 14. What is 12 factor App? - The 12-factor app methodology specifically created for building scala - This is derived by Heroku. - Read More @http://12factor.net/ Why 12 factor App? - Good code fails if you don’t have a process, complexity increase if yo
  • 15. 1-Codebase - One code base many deploys (deploy is running instance of the app). - Single root repo , don’t share your code with another app. - Shared code between multiple apps should be separated in another codebase.
  • 16. 2-Dependencies - Explicitly declare and isolate dependencies. - Never relies on implicit existence of system packages. - All app dependencies should be declared in dependency declaration m - Dependency declaration manifest in PHP is composer.json And the dependency management tool is Composer. - Twelve-factor apps also do not rely on the implicit existence of any sys
  • 17. 3-Config - Config is everything that vary between deploys(dev, stage, production - Config belongs to the environment not the App. - Config should be stored in the environment variables. - Apps sometimes store config as constants in the code. This is a violatio - You should can make your app open source at any moment without co
  • 18. 4-Backing Services - Any service the app consumes over the network as part of its normal o - Examples: messaging/queueing systems, Database store, cache system - Treat backing services as attached resources. - Should be accessed via URL in the config. - Make no distinct between local and third parity services. - A deploy of the twelve-factor app should be able to swap out a local M
  • 19. 5-Build, release, run - A codebase is transformed into a deployment in 3 stages: 1-Build: convert the code to executable bundle known as build (In Golang build results binary executeble file) 2-Release:take the build and combines it with deploy config. 3- Run : runs the app in the execution environment (also known as “run
  • 20. 6-Processes - Processes should be stateless and share no thing. - Any data that needs to persist must be stored in a stateful baking serv - For example, downloading a large file, operating on it, and storing the - Session are a violation of twelve-factor.
  • 21. 7-Port Binding - Export services via port binding. - One app can become a backing service for another app.
  • 22. 8-Concurrency - There are two types of scaling vertical )adding more resources( and h - You should be able to scale out(horizontally) and distribute the load b
  • 23. 9-Disposability - Your app should be quick to Strat up and graceful to shout down. - Quick to start up means app ideally take few seconds to startup. - Graceful to shut down means when the app receive a SIGTERM (term - If server die we should replace it and start another one quickly.
  • 24. 10-Dev/prod parity - Keep dev, stage and production as similar as possible. - Historically, there have been substantial gaps between development a - • Make the personnel gap small: developers who wrote code are closely involved in deploying it and w • Make the tools gap small: keep development and production as sim
  • 25. 11-Logs - Logs provide visibility into the behavior of a running app. - Treat logs as event streams. - It should not attempt to write to or manage log files. Instead, each ru - each process stream will be captured by the execution environment, a
  • 26. 12-Admin processes - Admin processes such as db migration and cron jobs should be run a - Run in another container (not the same container that handles user r