SlideShare a Scribd company logo
BUILDING
MICROSERVICES ON
AZURE
~ Vaibhav Gujral
@vabgujral
About Me ■ Over 11 years of experience
■ Working with Assurant Inc.
■ Microsoft Certified Azure Architect
■ MCSD, MCP, Microsoft Specialist
■ Aspiring Blogger & Community Champion
■ Interests– Value Investing, Photography &
Astronomy
■ Husband of One & Father of two
■ Blog – http://vaibhavgujral.wordpress.com
■ Twitter - @vabgujral
■ Skype – vaibhav.gujral
■ Email – gujral.vaibhav@hotmail.com
Agenda ■ What are Microservices?
■ Monolithic Vs Microservices
■ Characteristics & Benefits of Microservices
■ Design Considerations
■ Data Considerations
■ Inter-service communication
■ API Design & API Gateways
■ Logging and Monitoring
■ CI/CD pipeline for Microservices
■ Hosted Models for Microservices
■ Demo
WHAT ARE
MICROSERVICES
Monolithic Applications
(ref- https://www.martinfowler.com/articles/microservices.html)
■ Monolithic Application
– Built as a single unit
– Generally deployed as a single logical executable
– Single change involves building and deploying new version of whole application
– All the components/logic runs in a single process
– Horizontally scalable behind a load balancer
– Challenge 1 – Change cycles are tied together. A change made to a small part
of the application, requires the entire application to be rebuilt and deployed.
– Challenge 2 – Harder to maintain good modular structure/boundaries
– Challenge 3 – Scalability and Resiliency issues
Defining Microservices
Microservices is a variant of the service-oriented architecture (SOA) architectural style
that structures an application as a collection of loosely coupled services.
-Wikipedia
Microservices are an architectural and organizational approach to software
development where software is composed of small independent services that
communicate over well-defined APIs. These services are owned by small, self-contained
teams.
-Amazon
In a microservices architecture, the application is composed of small, independent
services.
-Microsoft
What are microservices?
In short, the microservice architectural style is an approach to developing a single
application as a suite of small services, each running in its own process and
communicating with lightweight mechanisms, often an HTTP resource API. These
services are built around business capabilities and independently deployable by fully
automated deployment machinery. There is a bare minimum of centralized
management of these services, which may be written in different programming
languages and use different data storage technologies.
—James Lewis & Martin Fowler
(ref- https://www.martinfowler.com/articles/microservices.html)
Monolithic Vs Microservices
(ref- https://www.martinfowler.com/articles/microservices.html)
Monolithic vs Microservices
Maintainability vs Changeability (Replaceability)
(ref- https://www.martinfowler.com/articles/microservices.html)
Microservices’ Characteristics
■ Each microservice implements a single business capability.
■ A microservice is small enough that a single small team of developers can write and
maintain it.
■ Microservices run in separate processes, communicating through well-defined APIs or
messaging patterns.
■ Microservices do not share data stores or data schemas. Each microservice is
responsible for managing its own data.
■ Microservices have separate code bases, and do not share source code. They may use
common utility libraries, however.
■ Each microservice can be deployed and updated independently of other services.
■ No technology barrier
SOA vs Microservices
■ SOA and microservices shares many features
■ Microservices can be considered a subset of SOA
■ Enterprise Service Bus – good example of SOA style architecture
■ Few key differences
– In Microservices services are deployed independently, unlike SOA, in which
deployment model is quite similar to a monolithic
– Microservices are lightweight as compared to SOA styled services which can be
a combination of services
– Microservices can have different data stores whereas in SOA, all services
share same data source.
Benefits of Microservices
■ Agility
■ Small Code, Small Teams
■ Mix of technologies
■ Resiliency
■ Scalability
■ Data Isolation
Adopters of Microservices
Design Considerations
■ Service Boundaries
■ Data consistency and integrity
■ Network Congestion and latency
■ Complexity
■ Communication between clients and application
■ Monitoring
■ Continuous Integration and Delivery (CI/CD)
Defining Service Boundaries
■ General Rule - Service should do "one thing“
■ Design around business capabilities, not horizontal layers such as data access or
messaging
■ Services should support loose coupling and high functional cohesion
■ A service should encapsulate domain knowledge and abstract that knowledge from
clients
Domain Analysis
■ Analyze the business domain to understand the application's functional requirements.
■ Next, define the bounded contexts of the domain. Each bounded context contains a
domain model that represents a particular subdomain of the larger application.
■ Within a bounded context, apply tactical DDD patterns to define entities, aggregates, and
domain services.
■ Identify the microservices in your application.
eCommerce – Domain Analysis
eCommerce – Bounded Contexts
Before finalizing, ensure…
■ Each service has a single responsibility.
■ There are no chatty calls between services. If splitting functionality into two services
causes them to be overly chatty, it may be a symptom that these functions belong in
the same service.
■ Each service is small enough that it can be built by a small team working
independently.
■ There are no inter-dependencies. It should always be possible to deploy a service
without redeploying any other services.
■ Services are not tightly coupled, and can evolve independently.
■ Your service boundaries will not create problems with data consistency or integrity.
Data Considerations
■ Each service manages its own data to avoid unintentional coupling between services.
■ It's fine for services to share the same physical database server. The problem occurs
when services share the same schema, or read and write to the same set of database
tables.
■ Embrace eventual consistency where possible.
■ For transactions, use patterns such as Scheduler Agent Supervisor and Compensating
Transaction to keep data consistent across several services.
■ For strong consistency guarantees, one service may represent the source of truth for a
given entity, which is exposed through an API. Other services might hold their own copy
of the data, or a subset of the data, that is eventually consistent with the master data
but not considered the source of truth.
Inter-service communication
■ Synchronous communication. In this pattern, a service calls an API that another
service exposes, using a protocol such as HTTP or RPC. This option is a synchronous
messaging pattern because the caller waits for a response from the receiver.
■ Asynchronous message passing. In this pattern, a service sends message without
waiting for a response, and one or more services process the message
asynchronously.
API Design
■ Two types of API:
– Public APIs that client applications call.
– Backend APIs that are used for inter-service communication.
■ Few Considerations –
– REST vs RPC
– Efficiency
– Serialization
– Framework and language support
– Compatibility & interoperability
API Gateways
■ Sits between clients and services
■ Acts as a reverse proxy, routing requests from clients to services
■ May also perform various cross-cutting tasks such as authentication, SSL termination,
and rate limiting
■ Available options in Azure:
– Azure Application Gateway
– Azure API Management
Logging And Monitoring
■ Critical for tracking what’s happening across services
■ Distributed Tracing - understanding the flow of events across services
– A single operation or transaction may involve calls to multiple services.
– To reconstruct the entire sequence of steps, each service should propagate
a correlation ID that acts as a unique identifier for that operation.
■ Available options in Azure
– Application Insights - managed service in Azure that ingests and stores
telemetry data, and provides tools for analyzing and searching the data.
CI/CD
■ Different options for updating services-
– Rolling Updates
– Blue-green deployments
– Canary Release
Hosting Models for Microservices
■ A service orchestrator that manages services running on dedicated nodes (VMs).
– Azure Service Fabric - a distributed systems platform for packaging, deploying,
and managing microservices.
– Azure Container Services - lets you deploy a production-ready Kubernetes,
DC/OS, or Docker Swarm cluster.
– AKS(Azure Container service) - a managed Kubernetes service.
■ A server-less architecture using functions as a service (FaaS).
– Azure Functions - a serverless compute service that supports various function
triggers, including HTTP requests, Service Bus queues, and Event Hubs events.
Orchestration Vs Server-less
-Factors to consider
■ Manageability
■ Flexibility and control
■ Portability
■ Application Integration
■ Cost
■ Scalability
DEMO
QUESTIONS?
References
■ https://docs.microsoft.com/en-us/azure/architecture/microservices/
■ https://www.martinfowler.com/articles/microservices.html
■ https://aws.amazon.com/microservices/
■ https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/
THANK YOU
Ad

More Related Content

What's hot (20)

Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
Callon Campbell
 
Azure Monitoring Overview
Azure Monitoring OverviewAzure Monitoring Overview
Azure Monitoring Overview
gjuljo
 
AWS Elastic Compute Cloud (EC2)
AWS Elastic Compute Cloud (EC2) AWS Elastic Compute Cloud (EC2)
AWS Elastic Compute Cloud (EC2)
zekeLabs Technologies
 
Uncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdfUncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdf
PankajGoyal164048
 
Aws overview
Aws overviewAws overview
Aws overview
abhijeetrajpurohit29
 
Presentation about servers
Presentation about serversPresentation about servers
Presentation about servers
Sasin Prabu
 
Cloud Computing and Amazon Web Services
Cloud Computing and Amazon Web ServicesCloud Computing and Amazon Web Services
Cloud Computing and Amazon Web Services
Aditya Jha
 
AWS EC2
AWS EC2AWS EC2
AWS EC2
Mahesh Raj
 
Resource Replication & Automated Scaling Listener
Resource Replication & Automated Scaling ListenerResource Replication & Automated Scaling Listener
Resource Replication & Automated Scaling Listener
Hitesh Mohapatra
 
Introduction to Azure monitor
Introduction to Azure monitorIntroduction to Azure monitor
Introduction to Azure monitor
Praveen Nair
 
Multi-Tenant Approach
Multi-Tenant ApproachMulti-Tenant Approach
Multi-Tenant Approach
Perfectial, LLC
 
Amazon Web Service Sales Role Play - Case Study
Amazon Web Service Sales Role Play - Case StudyAmazon Web Service Sales Role Play - Case Study
Amazon Web Service Sales Role Play - Case Study
Vineet Sood
 
Cloudhub 2.0
Cloudhub 2.0Cloudhub 2.0
Cloudhub 2.0
Christopher Co
 
Solace Singapore User Group: Dell Boomi Presentation
Solace Singapore User Group: Dell Boomi PresentationSolace Singapore User Group: Dell Boomi Presentation
Solace Singapore User Group: Dell Boomi Presentation
Solace
 
A complete guide to azure storage
A complete guide to azure storageA complete guide to azure storage
A complete guide to azure storage
Himanshu Sahu
 
Resource Cluster and Multi-Device Broker.pdf
Resource Cluster and Multi-Device Broker.pdfResource Cluster and Multi-Device Broker.pdf
Resource Cluster and Multi-Device Broker.pdf
Hitesh Mohapatra
 
Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)
Garvit Anand
 
Aws introduction
Aws introductionAws introduction
Aws introduction
MouryaKumar Reddy Rajala
 
AWS Presentation-1.ppt
AWS Presentation-1.pptAWS Presentation-1.ppt
AWS Presentation-1.ppt
usmanEhsan8
 
Azure vnet
Azure vnetAzure vnet
Azure vnet
zekeLabs Technologies
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
Callon Campbell
 
Azure Monitoring Overview
Azure Monitoring OverviewAzure Monitoring Overview
Azure Monitoring Overview
gjuljo
 
Uncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdfUncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdf
PankajGoyal164048
 
Presentation about servers
Presentation about serversPresentation about servers
Presentation about servers
Sasin Prabu
 
Cloud Computing and Amazon Web Services
Cloud Computing and Amazon Web ServicesCloud Computing and Amazon Web Services
Cloud Computing and Amazon Web Services
Aditya Jha
 
Resource Replication & Automated Scaling Listener
Resource Replication & Automated Scaling ListenerResource Replication & Automated Scaling Listener
Resource Replication & Automated Scaling Listener
Hitesh Mohapatra
 
Introduction to Azure monitor
Introduction to Azure monitorIntroduction to Azure monitor
Introduction to Azure monitor
Praveen Nair
 
Amazon Web Service Sales Role Play - Case Study
Amazon Web Service Sales Role Play - Case StudyAmazon Web Service Sales Role Play - Case Study
Amazon Web Service Sales Role Play - Case Study
Vineet Sood
 
Solace Singapore User Group: Dell Boomi Presentation
Solace Singapore User Group: Dell Boomi PresentationSolace Singapore User Group: Dell Boomi Presentation
Solace Singapore User Group: Dell Boomi Presentation
Solace
 
A complete guide to azure storage
A complete guide to azure storageA complete guide to azure storage
A complete guide to azure storage
Himanshu Sahu
 
Resource Cluster and Multi-Device Broker.pdf
Resource Cluster and Multi-Device Broker.pdfResource Cluster and Multi-Device Broker.pdf
Resource Cluster and Multi-Device Broker.pdf
Hitesh Mohapatra
 
Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)
Garvit Anand
 
AWS Presentation-1.ppt
AWS Presentation-1.pptAWS Presentation-1.ppt
AWS Presentation-1.ppt
usmanEhsan8
 

Similar to Building microservices on azure (20)

Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
Kasun Indrasiri
 
Microservice's in detailed
Microservice's in detailedMicroservice's in detailed
Microservice's in detailed
Mohammed Fazuluddin
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
WSO2
 
Micro Services
Micro ServicesMicro Services
Micro Services
SARADHIREDDYK
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
Linjith Kunnon
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
Kasun Indrasiri
 
Modern Software Architecture - Cloud Scale Computing
Modern Software Architecture - Cloud Scale ComputingModern Software Architecture - Cloud Scale Computing
Modern Software Architecture - Cloud Scale Computing
Giragadurai Vallirajan
 
Discussion About Microservices Architecture
Discussion About Microservices ArchitectureDiscussion About Microservices Architecture
Discussion About Microservices Architecture
Ralph Osmond Rimorin
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
Jim (张建军) Zhang
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
Touraj Ebrahimi
 
Building Cloud Network.pptx
Building Cloud Network.pptxBuilding Cloud Network.pptx
Building Cloud Network.pptx
Hasaanali14
 
Introduction to Microservices.pdf
Introduction to Microservices.pdfIntroduction to Microservices.pdf
Introduction to Microservices.pdf
ShehanNIlanka
 
1 (1).pptx
1 (1).pptx1 (1).pptx
1 (1).pptx
SabitaRajbanshi1
 
DevOps-training-in-chandigarh-Join-now--
DevOps-training-in-chandigarh-Join-now--DevOps-training-in-chandigarh-Join-now--
DevOps-training-in-chandigarh-Join-now--
asmeerana605
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
Rodrigo Antonialli
 
Meetup6 microservices for the IoT
Meetup6 microservices for the IoTMeetup6 microservices for the IoT
Meetup6 microservices for the IoT
Francesco Rago
 
APIs from the Edge to the Mesh
APIs from the Edge to the MeshAPIs from the Edge to the Mesh
APIs from the Edge to the Mesh
Nordic APIs
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO Forum
Rick Hightower
 
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JSFestUA
 
Cloud Customer Architecture for Securing Workloads on Cloud Services
Cloud Customer Architecture for Securing Workloads on Cloud ServicesCloud Customer Architecture for Securing Workloads on Cloud Services
Cloud Customer Architecture for Securing Workloads on Cloud Services
Cloud Standards Customer Council
 
Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
Kasun Indrasiri
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
WSO2
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
Linjith Kunnon
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
Kasun Indrasiri
 
Modern Software Architecture - Cloud Scale Computing
Modern Software Architecture - Cloud Scale ComputingModern Software Architecture - Cloud Scale Computing
Modern Software Architecture - Cloud Scale Computing
Giragadurai Vallirajan
 
Discussion About Microservices Architecture
Discussion About Microservices ArchitectureDiscussion About Microservices Architecture
Discussion About Microservices Architecture
Ralph Osmond Rimorin
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
Jim (张建军) Zhang
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
Touraj Ebrahimi
 
Building Cloud Network.pptx
Building Cloud Network.pptxBuilding Cloud Network.pptx
Building Cloud Network.pptx
Hasaanali14
 
Introduction to Microservices.pdf
Introduction to Microservices.pdfIntroduction to Microservices.pdf
Introduction to Microservices.pdf
ShehanNIlanka
 
DevOps-training-in-chandigarh-Join-now--
DevOps-training-in-chandigarh-Join-now--DevOps-training-in-chandigarh-Join-now--
DevOps-training-in-chandigarh-Join-now--
asmeerana605
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
Rodrigo Antonialli
 
Meetup6 microservices for the IoT
Meetup6 microservices for the IoTMeetup6 microservices for the IoT
Meetup6 microservices for the IoT
Francesco Rago
 
APIs from the Edge to the Mesh
APIs from the Edge to the MeshAPIs from the Edge to the Mesh
APIs from the Edge to the Mesh
Nordic APIs
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO Forum
Rick Hightower
 
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JSFestUA
 
Cloud Customer Architecture for Securing Workloads on Cloud Services
Cloud Customer Architecture for Securing Workloads on Cloud ServicesCloud Customer Architecture for Securing Workloads on Cloud Services
Cloud Customer Architecture for Securing Workloads on Cloud Services
Cloud Standards Customer Council
 
Ad

Recently uploaded (20)

How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Ad

Building microservices on azure

  • 2. About Me ■ Over 11 years of experience ■ Working with Assurant Inc. ■ Microsoft Certified Azure Architect ■ MCSD, MCP, Microsoft Specialist ■ Aspiring Blogger & Community Champion ■ Interests– Value Investing, Photography & Astronomy ■ Husband of One & Father of two ■ Blog – http://vaibhavgujral.wordpress.com ■ Twitter - @vabgujral ■ Skype – vaibhav.gujral ■ Email – [email protected]
  • 3. Agenda ■ What are Microservices? ■ Monolithic Vs Microservices ■ Characteristics & Benefits of Microservices ■ Design Considerations ■ Data Considerations ■ Inter-service communication ■ API Design & API Gateways ■ Logging and Monitoring ■ CI/CD pipeline for Microservices ■ Hosted Models for Microservices ■ Demo
  • 5. Monolithic Applications (ref- https://www.martinfowler.com/articles/microservices.html) ■ Monolithic Application – Built as a single unit – Generally deployed as a single logical executable – Single change involves building and deploying new version of whole application – All the components/logic runs in a single process – Horizontally scalable behind a load balancer – Challenge 1 – Change cycles are tied together. A change made to a small part of the application, requires the entire application to be rebuilt and deployed. – Challenge 2 – Harder to maintain good modular structure/boundaries – Challenge 3 – Scalability and Resiliency issues
  • 6. Defining Microservices Microservices is a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services. -Wikipedia Microservices are an architectural and organizational approach to software development where software is composed of small independent services that communicate over well-defined APIs. These services are owned by small, self-contained teams. -Amazon In a microservices architecture, the application is composed of small, independent services. -Microsoft
  • 7. What are microservices? In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. —James Lewis & Martin Fowler (ref- https://www.martinfowler.com/articles/microservices.html)
  • 8. Monolithic Vs Microservices (ref- https://www.martinfowler.com/articles/microservices.html)
  • 10. Maintainability vs Changeability (Replaceability) (ref- https://www.martinfowler.com/articles/microservices.html)
  • 11. Microservices’ Characteristics ■ Each microservice implements a single business capability. ■ A microservice is small enough that a single small team of developers can write and maintain it. ■ Microservices run in separate processes, communicating through well-defined APIs or messaging patterns. ■ Microservices do not share data stores or data schemas. Each microservice is responsible for managing its own data. ■ Microservices have separate code bases, and do not share source code. They may use common utility libraries, however. ■ Each microservice can be deployed and updated independently of other services. ■ No technology barrier
  • 12. SOA vs Microservices ■ SOA and microservices shares many features ■ Microservices can be considered a subset of SOA ■ Enterprise Service Bus – good example of SOA style architecture ■ Few key differences – In Microservices services are deployed independently, unlike SOA, in which deployment model is quite similar to a monolithic – Microservices are lightweight as compared to SOA styled services which can be a combination of services – Microservices can have different data stores whereas in SOA, all services share same data source.
  • 13. Benefits of Microservices ■ Agility ■ Small Code, Small Teams ■ Mix of technologies ■ Resiliency ■ Scalability ■ Data Isolation
  • 15. Design Considerations ■ Service Boundaries ■ Data consistency and integrity ■ Network Congestion and latency ■ Complexity ■ Communication between clients and application ■ Monitoring ■ Continuous Integration and Delivery (CI/CD)
  • 16. Defining Service Boundaries ■ General Rule - Service should do "one thing“ ■ Design around business capabilities, not horizontal layers such as data access or messaging ■ Services should support loose coupling and high functional cohesion ■ A service should encapsulate domain knowledge and abstract that knowledge from clients
  • 17. Domain Analysis ■ Analyze the business domain to understand the application's functional requirements. ■ Next, define the bounded contexts of the domain. Each bounded context contains a domain model that represents a particular subdomain of the larger application. ■ Within a bounded context, apply tactical DDD patterns to define entities, aggregates, and domain services. ■ Identify the microservices in your application.
  • 20. Before finalizing, ensure… ■ Each service has a single responsibility. ■ There are no chatty calls between services. If splitting functionality into two services causes them to be overly chatty, it may be a symptom that these functions belong in the same service. ■ Each service is small enough that it can be built by a small team working independently. ■ There are no inter-dependencies. It should always be possible to deploy a service without redeploying any other services. ■ Services are not tightly coupled, and can evolve independently. ■ Your service boundaries will not create problems with data consistency or integrity.
  • 21. Data Considerations ■ Each service manages its own data to avoid unintentional coupling between services. ■ It's fine for services to share the same physical database server. The problem occurs when services share the same schema, or read and write to the same set of database tables. ■ Embrace eventual consistency where possible. ■ For transactions, use patterns such as Scheduler Agent Supervisor and Compensating Transaction to keep data consistent across several services. ■ For strong consistency guarantees, one service may represent the source of truth for a given entity, which is exposed through an API. Other services might hold their own copy of the data, or a subset of the data, that is eventually consistent with the master data but not considered the source of truth.
  • 22. Inter-service communication ■ Synchronous communication. In this pattern, a service calls an API that another service exposes, using a protocol such as HTTP or RPC. This option is a synchronous messaging pattern because the caller waits for a response from the receiver. ■ Asynchronous message passing. In this pattern, a service sends message without waiting for a response, and one or more services process the message asynchronously.
  • 23. API Design ■ Two types of API: – Public APIs that client applications call. – Backend APIs that are used for inter-service communication. ■ Few Considerations – – REST vs RPC – Efficiency – Serialization – Framework and language support – Compatibility & interoperability
  • 24. API Gateways ■ Sits between clients and services ■ Acts as a reverse proxy, routing requests from clients to services ■ May also perform various cross-cutting tasks such as authentication, SSL termination, and rate limiting ■ Available options in Azure: – Azure Application Gateway – Azure API Management
  • 25. Logging And Monitoring ■ Critical for tracking what’s happening across services ■ Distributed Tracing - understanding the flow of events across services – A single operation or transaction may involve calls to multiple services. – To reconstruct the entire sequence of steps, each service should propagate a correlation ID that acts as a unique identifier for that operation. ■ Available options in Azure – Application Insights - managed service in Azure that ingests and stores telemetry data, and provides tools for analyzing and searching the data.
  • 26. CI/CD ■ Different options for updating services- – Rolling Updates – Blue-green deployments – Canary Release
  • 27. Hosting Models for Microservices ■ A service orchestrator that manages services running on dedicated nodes (VMs). – Azure Service Fabric - a distributed systems platform for packaging, deploying, and managing microservices. – Azure Container Services - lets you deploy a production-ready Kubernetes, DC/OS, or Docker Swarm cluster. – AKS(Azure Container service) - a managed Kubernetes service. ■ A server-less architecture using functions as a service (FaaS). – Azure Functions - a serverless compute service that supports various function triggers, including HTTP requests, Service Bus queues, and Event Hubs events.
  • 28. Orchestration Vs Server-less -Factors to consider ■ Manageability ■ Flexibility and control ■ Portability ■ Application Integration ■ Cost ■ Scalability
  • 29. DEMO
  • 31. References ■ https://docs.microsoft.com/en-us/azure/architecture/microservices/ ■ https://www.martinfowler.com/articles/microservices.html ■ https://aws.amazon.com/microservices/ ■ https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/