SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
Introduction to
Microservices
Architecture
What is Application Architecture?
The process of defining a structured solution that
meets all of the technical and operational
requirements, while optimizing common quality
attributes such as performance, security, and
manageability.
Key Principles of Application Architecture
• Scalability
• Maintainability
• Customizability
• Deployment Strategy
Scalability
Scale cube
Y axis - functional decomposition
Splitting different things
X axis - horizontal duplication
cloning
Z axis - data partitioning
Splitting similar things
Maintainability
• Simple to modify
• Easy to find solutions for bugs
• Decrease the participation cost
• Decrease maintenance effort
Customizability
• Configurable parts
• Modularity
Deployment Strategy
• Performance
• Security
• Availability
• Monitoring
• Scalability
What we are doing?
Traditional
Monolithic
Architecture
Monolithic Architecture
DB
AdapterRest
Adapter
Web UI
SMS
Adapter
Email
Adapter
Twilio
Send
Grid
Payments
Billings Notifications
Products
Customers
Monolithic Architecture is simple to:
• Develop
• Test
• Deploy
• Scale
Monolithic Architecture Drawbacks
For Large Applications
• High participation cost
• Overloaded IDE
• Continuous deployment is difficult
• Scaling the application can be difficult
• Obstacle to scaling development
• Requires a long-term commitment to a technology
stack
So
what can we do?
Microservices
Architecture
Tackling the Complexity
What are Microservices?
• Split the application into set of smaller, loosely
coupled services.
• Each microservice is a mini‑application that has
its own architecture consisting of business logic
along with various adapters.
• Some microservices would expose an API that’s
consumed by other microservices or by the
application’s clients. Other microservices might
implement a web UI.
Microservices Architecture
DB
Adapter
Api
Gateway
Web UI
SMS
Adapter
Email
Adapter
Twilio
Send
Grid
Payments
Billings
Notifications
Products
Customers
Microservices
Key Principles of Microservices Architecture
• Services communication Protocol (ex: REST, SOAP or
AMQP)
• Client interaction
• Database distribution per microservice
• Scalability per microservice
• Service discovery mechanism
• Data inter-services passing (ex: Security token)
Microservices Architecture Benefits
• Better testability
• Continuous deployment is simple
• Better team management
• Less participation cost
• Faster IDE
• Improved fault isolation
• Each service can be scaled independently
• Eliminates any long-term commitment to a technology stack
But
There are no silver bullets
Microservices Architecture Drawbacks
• Additional complexity
• Partitioned database architecture
• Multiple client endpoints
• Service discovery (Client, Server)
• Duplicate data
• Complex interconnected services testing
• Complex deployment
• Multiple services changes - relatively rare
Microservices Architecture Drawbacks
Partitioned Database
• Update multiple databases owned by different
services, where distributed transactions is usually
not an option
• Different kinds of databases
• Rollback mechanism
• Relational queries
• Consistency … Consistency … Consistency
Microservices Architecture Drawbacks
Partitioned Database
Order
Service
Customers
Service
Id Credit LimitId Customer Id Status
Microservices Architecture Drawbacks - Partitioned Database
Event‑Driven Architecture
Order
Service
Customers
Service
Id Credit LimitId Customer Id Status
Message
Broker
Order Created
Credit Reserved
Order Published
Microservices Architecture Drawbacks - Partitioned Database
Event‑Driven Architecture
Order
Service
Customers
Service
Id Credit LimitId Customer Id Status
Message
Broker
Order Created
Credit Limit Exceeded
Order Declined
Microservices Architecture Drawbacks - Partitioned Database
Event‑Sourcing Architecture
Command Query Responsibility Segregation (CQRS)
Order
Service
Customers
Service
Id Event Type State
Order Created
Order
Approved
Add Events
Find Events
Subscribe to Events
Microservices Architecture Drawbacks
Multiple client endpoints
• The mismatch between the needs of the client and the
fine‑grained APIs exposed by each of the microservices
• Different clients need different data
• Network performance is different for different types of
clients
• Service instances and their locations (host+port)
changes dynamically
• Services might use a diverse set of protocols
Microservices Architecture Drawbacks
Multiple client endpoints
Order
Service
Customers
Service
Mobile
?
Microservices Architecture Drawbacks - Multiple client endpoints
API Gateway
Order
Service
Customers
Service
Mobile
API Gateway
Microservices Architecture Drawbacks
Service discovery
• Each instance of a service exposes a remote API such
as HTTP/REST. at a particular location (host and port)
• The number of services instances and their locations
changes dynamically.
• Virtual machines and containers are usually assigned
dynamic IP addresses.
• The number of services instances might vary
dynamically. For example, an EC2 Autoscaling Group
adjusts the number of instances based on load.
Microservices Architecture Drawbacks
Service discovery
Service
Client
Customers
Service
? Order
Service
Dynamic IP
Dynamic IP
Microservices Architecture Drawbacks - Service discovery
Server-side service discovery
Service
Client
Customers
Service
Order
Service
Router
Service
Registry
Query
Microservices Architecture Drawbacks - Service discovery
Client-side service discovery
Service
Client
Customers
Service
Order
Service
Service
Registry
Query
Registry
Aware Http
Client
References
• https://www.nginx.com/blog/introduction-to-
microservices/
• http://microservices.io
• Google … Google … Google
Thank You

Contenu connexe

Tendances

Presentation cloud computing
Presentation cloud computingPresentation cloud computing
Presentation cloud computing
Akash Pandey
 

Tendances (20)

Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
REST vs. Messaging For Microservices
REST vs. Messaging For MicroservicesREST vs. Messaging For Microservices
REST vs. Messaging For Microservices
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Microservice
MicroserviceMicroservice
Microservice
 
Presentation cloud computing
Presentation cloud computingPresentation cloud computing
Presentation cloud computing
 
Developing, Administering and Debugging with WSO2 Enterprise Integrator
Developing, Administering and Debugging with WSO2 Enterprise IntegratorDeveloping, Administering and Debugging with WSO2 Enterprise Integrator
Developing, Administering and Debugging with WSO2 Enterprise Integrator
 
Develop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverlessDevelop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverless
 
Observability for Integration Using WSO2 Enterprise Integrator
Observability for Integration Using WSO2 Enterprise IntegratorObservability for Integration Using WSO2 Enterprise Integrator
Observability for Integration Using WSO2 Enterprise Integrator
 
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
 
Enterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices ArchitecturesEnterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices Architectures
 
Microservices
MicroservicesMicroservices
Microservices
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
 
Evaluating Streaming Data Solutions
Evaluating Streaming Data SolutionsEvaluating Streaming Data Solutions
Evaluating Streaming Data Solutions
 
Microservices
MicroservicesMicroservices
Microservices
 
Microservice Architecture 101
Microservice Architecture 101Microservice Architecture 101
Microservice Architecture 101
 
Microservices for Application Modernisation
Microservices for Application ModernisationMicroservices for Application Modernisation
Microservices for Application Modernisation
 
DEVNET-1184 Microservices Patterns
DEVNET-1184	Microservices PatternsDEVNET-1184	Microservices Patterns
DEVNET-1184 Microservices Patterns
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
 
SOA vs Microservices vs SBA
SOA vs Microservices vs SBASOA vs Microservices vs SBA
SOA vs Microservices vs SBA
 

Similaire à Microservices architecture

Cloudhnologysstecociat
CloudhnologysstecociatCloudhnologysstecociat
Cloudhnologysstecociat
Anne Starr
 
ServiceFabric-Arch
ServiceFabric-ArchServiceFabric-Arch
ServiceFabric-Arch
Saravanan G
 

Similaire à Microservices architecture (20)

Pros & Cons of Microservices Architecture
Pros & Cons of Microservices ArchitecturePros & Cons of Microservices Architecture
Pros & Cons of Microservices Architecture
 
SOA - Unit 1 - Introduction to SOA with Web Services
SOA - Unit   1 - Introduction to SOA with Web ServicesSOA - Unit   1 - Introduction to SOA with Web Services
SOA - Unit 1 - Introduction to SOA with Web Services
 
Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service FabricTokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
 
Micro service session 1
Micro service   session 1Micro service   session 1
Micro service session 1
 
Microservices Journey NYC
Microservices Journey NYCMicroservices Journey NYC
Microservices Journey NYC
 
High Level Overview of Windows Azure - EPC Group
High Level Overview of Windows Azure - EPC GroupHigh Level Overview of Windows Azure - EPC Group
High Level Overview of Windows Azure - EPC Group
 
Service Fabric – building tomorrows applications today
Service Fabric – building tomorrows applications todayService Fabric – building tomorrows applications today
Service Fabric – building tomorrows applications today
 
Azure service fabric overview
Azure service fabric overviewAzure service fabric overview
Azure service fabric overview
 
Cloudhnologysstecociat
CloudhnologysstecociatCloudhnologysstecociat
Cloudhnologysstecociat
 
Systematic Migration of Monolith to Microservices
Systematic Migration of Monolith to MicroservicesSystematic Migration of Monolith to Microservices
Systematic Migration of Monolith to Microservices
 
ServiceFabric-Arch
ServiceFabric-ArchServiceFabric-Arch
ServiceFabric-Arch
 
Designing microservices part2
Designing microservices part2Designing microservices part2
Designing microservices part2
 
The Evolving Data Center – Past, Present and Future
The Evolving Data Center – Past, Present and FutureThe Evolving Data Center – Past, Present and Future
The Evolving Data Center – Past, Present and Future
 
SOA - Unit 4 - SOA & Web Services for integration and Multi-Channel access
SOA - Unit   4 - SOA & Web Services for integration and Multi-Channel accessSOA - Unit   4 - SOA & Web Services for integration and Multi-Channel access
SOA - Unit 4 - SOA & Web Services for integration and Multi-Channel access
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?
 
SecureKloud_Corporate Deck.pdf
SecureKloud_Corporate Deck.pdfSecureKloud_Corporate Deck.pdf
SecureKloud_Corporate Deck.pdf
 
Innovating with AWS: How Microservices on AWS Can Transform Your Business
Innovating with AWS: How Microservices on AWS Can Transform Your BusinessInnovating with AWS: How Microservices on AWS Can Transform Your Business
Innovating with AWS: How Microservices on AWS Can Transform Your Business
 
Microservices using .Net core
Microservices using .Net coreMicroservices using .Net core
Microservices using .Net core
 
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
 
Microservice.net by sergey seletsky
Microservice.net by sergey seletskyMicroservice.net by sergey seletsky
Microservice.net by sergey seletsky
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Microservices architecture