SlideShare a Scribd company logo
Agenda
• Microservices?
• Service Fabric?
• Microservices in Service Fabric?
Demo code on GitHub: https://github.com/n3wt0n
Slides on SlideShare: https://www.slideshare.net/n3wt0n
What is a microservice?
• Encapsulates a single capability
• Are developed by a small engineering team
• Can be written in any language and framework
• Contain code plus state that is independently versioned, deployed, and scaled
• Interact with other microservices over well defined interfaces and protocols such as http
• Have a unique name (i.e. URL) that can be resolved
• Remains consistent and available in the presence of failures
• Ideal for DevOps automation!
Reasons to split a monolith into services
• Scaling independently (balancing cost with speed)
• Supporting different technology stacks
Reasons to split a monolith into services
• Two or more clients, where clients adopt new features at will
• Managing conflicting dependencies
Are microservices right for my app?
Maybe, if:
• Your application can be split in many different, independent pieces
• You need/want independent service scalability
• You need/want to have multiple technologies, multiple teams involved
• You are ready to change your DevOps practices and company culture
But:
• Any application that binds its components over a network connection introduces delays
• Security and Authentication get more complex
• Microservices are more complex to deploy, manage, and monitor
• You cannot assume that you can take an arbitrary system and break it into microservices.
Most systems acquire too many dependencies between their modules
From Monolith to Microservices
... we support any stage you choose
New or
transformed
microservices app
5
Parts of existing
monolith
extracted
4
Existing Monolith + new
microservices
3
Monolith Hosted as
guest executable or
container
2
Traditional app
1
5 stages in a continuum…
• Comparing an in-process call to an HTTP request
• Performance: Worse & increases network congestion
• Unpredictable time: Managing timeouts is challenging; pass deadlines
• Unreliable: Requires retry loops with exponential backup/circuit breakers
• Server code must be idempotent
• Security: Requires authentication, authorization, & encryption
• Debugging: network issues, perf counters/events/logs, causality/call stacks
IntelliSense, refactoring & compile-time type-safety)
IntelliSense, refactoring & compile-time type-safety)
Proven platform powering core Azure
and Microsoft services
Microsoft has deep expertise in running global
services such as Cortana, Skype & Cosmos DB
Service Fabric is the foundational technology
powering these services & core Azure infra
Sample scale of one of these services: 60 billion
events per day with millions of databases
Production scenarios with 3500 VMs
SQL
{ }Power BI
Dynamics
Intune
Cortana Skype
Cosmos DB
IoT Hub
Events Hub
SQL Database
Build: data-aware microservices
Lifecycle
Management
Always On
Availability
Orchestration Programming
Models
Health &
Monitoring
Dev & Ops
Tooling
Auto
Scaling
Programming
Models
Dev & Ops
Tooling
Orchestration Lifecycle
Management
Health &
Monitoring
Always On
Availability
Auto
Scaling
.NET or Java …
Built-in ASP.NET core integration;
work with VS and VSTS or
Eclipse and Jenkins
Reliable Services
Manage state reliability
without a database,
lowering latency
Guest Executables
Run existing code and
orchestrate life cycle using
service fabric
Reliable Actors
Implementation of actor design
pattern (Isolated, independent unit
of compute and state with single-
threaded execution)
Containers
Orchestrate your Windows
Server or Linux containers
reliably at scale
</>
Deploy: any code on any OS
Lifecycle
Management
Always On
Availability
Orchestration Programming
Models
Health &
Monitoring
Dev & Ops
Tooling
Auto
Scaling
Programming
Models
Dev & Ops
Tooling
Orchestration Lifecycle
Management
Health &
Monitoring
Always On
Availability
Auto
Scaling
Monitor and diagnose
Generate, aggregate, and analyze
events with built-in tooling and
integration with Azure services
Docker Compose
Orchestrate existing
container applications
natively
Automate
Deploy or remove applications
using PowerShell, CLI, Visual
Studio, and other APIs
CI/CD
Maximize uptime and scalability
with isolated compute threads
running concurrently
Rolling upgrades
Upgrade non-disruptively and
roll-back in case of failures,
automate with PowerShell
Operate: on any cloud at any scale
Lifecycle
Management
Always On
Availability
Orchestration Programming
Models
Health &
Monitoring
Dev & Ops
Tooling
Auto
Scaling
Programming
Models
Dev & Ops
Tooling
Orchestration Lifecycle
Management
Health &
Monitoring
Always On
Availability
Auto
Scaling
Scale programmatically
Use PowerShell, CLI, or APIs to
scale programmatically achieving
very high densities
Use controlled chaos
Test graceful and
ungraceful failure
scenarios
Recover gracefully
Recover from node or service
failure gracefully; replicate
data automatically
Use familiar tools
Such as Splunk, OMS, ELK, or
AppInsights to gain deep insights
or monitor application health
Secure at scale
Secure node-to-node
communication and user access
using built-in capabilities
Awesome for developers
Use .NET, Java or more
• Stateless and Stateful services
• ASP.NET core integration
Visual studio integration
• Use single node cluster for dev/test purposes
• Use 5-node local cluster for extensive dev/test
Consistent experience across environments
• Run the same environment on dev box as in production
Awesome for dev-ops
Automated deployment
• Use PowerShell, Service Fabric CLI or APIs
Rolling upgrades for reliability
• Upgrade your services in an automated fashion
Visual studio team services integration
• For continuous integration and deployment
Integration with Jenkins and more
• Use tools familiar to you for deploying Java applications
Awesome for infrastructure
management
Cluster management
• Secure your clusters and handle failures gracefully
• Scale clusters programmatically or manually
• Ease maintenance with integrated OS patching
PowerShell, CLI, and GUI management
• Be productive and choose tools that suit your needs
Applications as an ARM resource
• Manage clusters as well as deploy app using templates
Health monitoring
• Monitor using integrated or 3rd party tool of your choice
• Query health using PowerShell or APIs programmatically
Handling Machine Failures
Cluster
V1V1
V1V1
V1V1
V2V2
V2V2
V2V2
Cluster
V1V1
V1V1
V1V1
V2V2
V2V2
V2V2
Cluster (or across 2 clusters)
V2V2
V2V2
V2V2
V1V1
V1V1
V1V1
LB / Rev
Proxy
• All API requests must pass version info starting with v1
• New service versions must be backward compatible
• What about intra-service instance requests?
• During rolling update, old & new service instances run together
• Failure occurs if v2 instance makes v2 API request to v1 service instance
• Fix by performing a 2-phase update
1. Deploy v2 service instances (which accept v2 & v1 API requests)
• But never send v2 API requests
2. After all instances are v2, reconfigure instances to send v2 API requests
• OPTIONAL: After all instances upgraded, deploy again with v1 code removed
• Services start/stop, scale up/down, & crash/move
• Each instance has its own endpoint (dynamically-assigned IP/port)
• Clients must dynamically discover service instance endpoints and load balance between
them
• Beware: a new service instance could be assigned a previous instance’s endpoint
• This requires certificates or some ID/uniqueness so client knows which
service it’s communicating with
Who is App1/Service1?There you go: 10.0.0.8:1234
Different ways
Stateless microservice
Stateful microservice
Stateless microservices pattern
Load Balancer
Front End
(Stateless Web)
Stateless
Middle-tier
Compute
Cache
StorageQueues
Stateless microservices pattern
• Stateless services can have an external endpoint
• Configure the endpoint in ServiceManifest.xml (especially the port)
• For external accessible services, remember to configure Load Balancer
• Stateless service instances are equivalent and activated “randomly”
Stateful microservices pattern
Load Balancer
Front End
(Stateless Web)
Stateful
Middle-tier
Compute
Cold Data
Stores
(Optional)
Stateful microservices pattern
• Stateful services cannot have an external endpoint
• Stateful services must specify partitions
• Stateful service instances are not equivalent and not activated “randomly”
• Stateful services use Reliable Collections to persist the data
Reliable collections
• Reliable collections make it easy to build stateful services.
• An evolution of .NET collections for the cloud.
Collections
• Single machine
• Single threaded
Concurrent
collections
• Single machine
• Multi threaded
Reliable collections
• Multi machine
• Replicated (HA)
• Persistence (durable)
• Asynchronous
• Transactional
Some notes…
• Development
• Service communication
References
Demo Code and Slides
https://github.com/n3wt0n
https://www.slideshare.net/n3wt0n
Service Fabric Reference Documentation
https://docs.microsoft.com/en-us/azure/service-fabric/
Service Fabric Reference Architecture
https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-
styles/microservices#microservices-using-azure-service-fabric
.NET microservices with Azure Service Fabric

More Related Content

What's hot

Service Fabric Overview (Yves Goeleven)
Service Fabric Overview (Yves Goeleven)Service Fabric Overview (Yves Goeleven)
Service Fabric Overview (Yves Goeleven)
Visug
 
Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.
Nills Franssens
 
Azure service fabric
Azure service fabricAzure service fabric
Azure service fabric
Fernando Mejía
 
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
CodeOps Technologies LLP
 
Azure service fabric: a gentle introduction
Azure service fabric: a gentle introductionAzure service fabric: a gentle introduction
Azure service fabric: a gentle introduction
Alessandro Melchiori
 
Serverless
ServerlessServerless
Serverless
Vishwas N
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016
Apcera
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
Robert Greiner
 
ASP.NET Core deployment options
ASP.NET Core deployment optionsASP.NET Core deployment options
ASP.NET Core deployment options
Ken Cenerelli
 
Why Kubernetes on Azure
Why Kubernetes on AzureWhy Kubernetes on Azure
Why Kubernetes on Azure
Microsoft Tech Community
 
Azure dev ops integrations with Jenkins
Azure dev ops integrations with JenkinsAzure dev ops integrations with Jenkins
Azure dev ops integrations with Jenkins
Damien Caro
 
Ibm cloud nativenetflixossfinal
Ibm cloud nativenetflixossfinalIbm cloud nativenetflixossfinal
Ibm cloud nativenetflixossfinalaspyker
 
Contract-based Testing Approach as a Tool for Shift Lef
Contract-based Testing Approach as a Tool for Shift LefContract-based Testing Approach as a Tool for Shift Lef
Contract-based Testing Approach as a Tool for Shift Lef
Katherine Golovinova
 
The Microservices world in. NET Core and. NET framework
The Microservices world in. NET Core and. NET frameworkThe Microservices world in. NET Core and. NET framework
The Microservices world in. NET Core and. NET framework
Massimo Bonanni
 
CICD Azure DevOps
CICD Azure DevOpsCICD Azure DevOps
CICD Azure DevOps
Sergey Seletsky
 
Resume_Ashok-updated (1) (1)
Resume_Ashok-updated (1) (1)Resume_Ashok-updated (1) (1)
Resume_Ashok-updated (1) (1)chimmili ashok
 
How to build the Cloud Native applications the way you want – not the way the...
How to build the Cloud Native applications the way you want – not the way the...How to build the Cloud Native applications the way you want – not the way the...
How to build the Cloud Native applications the way you want – not the way the...
Eficode
 
Containers and OpenStack - A Happy Marriage - Madhuri - Intel - CC18
Containers and OpenStack - A Happy Marriage - Madhuri - Intel - CC18Containers and OpenStack - A Happy Marriage - Madhuri - Intel - CC18
Containers and OpenStack - A Happy Marriage - Madhuri - Intel - CC18
CodeOps Technologies LLP
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
AWS Vietnam Community
 
MS Insights Brazil 2015 containers and devops
MS Insights Brazil 2015   containers and devopsMS Insights Brazil 2015   containers and devops
MS Insights Brazil 2015 containers and devops
Damien Caro
 

What's hot (20)

Service Fabric Overview (Yves Goeleven)
Service Fabric Overview (Yves Goeleven)Service Fabric Overview (Yves Goeleven)
Service Fabric Overview (Yves Goeleven)
 
Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.
 
Azure service fabric
Azure service fabricAzure service fabric
Azure service fabric
 
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
 
Azure service fabric: a gentle introduction
Azure service fabric: a gentle introductionAzure service fabric: a gentle introduction
Azure service fabric: a gentle introduction
 
Serverless
ServerlessServerless
Serverless
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
ASP.NET Core deployment options
ASP.NET Core deployment optionsASP.NET Core deployment options
ASP.NET Core deployment options
 
Why Kubernetes on Azure
Why Kubernetes on AzureWhy Kubernetes on Azure
Why Kubernetes on Azure
 
Azure dev ops integrations with Jenkins
Azure dev ops integrations with JenkinsAzure dev ops integrations with Jenkins
Azure dev ops integrations with Jenkins
 
Ibm cloud nativenetflixossfinal
Ibm cloud nativenetflixossfinalIbm cloud nativenetflixossfinal
Ibm cloud nativenetflixossfinal
 
Contract-based Testing Approach as a Tool for Shift Lef
Contract-based Testing Approach as a Tool for Shift LefContract-based Testing Approach as a Tool for Shift Lef
Contract-based Testing Approach as a Tool for Shift Lef
 
The Microservices world in. NET Core and. NET framework
The Microservices world in. NET Core and. NET frameworkThe Microservices world in. NET Core and. NET framework
The Microservices world in. NET Core and. NET framework
 
CICD Azure DevOps
CICD Azure DevOpsCICD Azure DevOps
CICD Azure DevOps
 
Resume_Ashok-updated (1) (1)
Resume_Ashok-updated (1) (1)Resume_Ashok-updated (1) (1)
Resume_Ashok-updated (1) (1)
 
How to build the Cloud Native applications the way you want – not the way the...
How to build the Cloud Native applications the way you want – not the way the...How to build the Cloud Native applications the way you want – not the way the...
How to build the Cloud Native applications the way you want – not the way the...
 
Containers and OpenStack - A Happy Marriage - Madhuri - Intel - CC18
Containers and OpenStack - A Happy Marriage - Madhuri - Intel - CC18Containers and OpenStack - A Happy Marriage - Madhuri - Intel - CC18
Containers and OpenStack - A Happy Marriage - Madhuri - Intel - CC18
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
 
MS Insights Brazil 2015 containers and devops
MS Insights Brazil 2015   containers and devopsMS Insights Brazil 2015   containers and devops
MS Insights Brazil 2015 containers and devops
 

Similar to .NET microservices with Azure Service Fabric

Microservices with Azure Service Fabric
Microservices with Azure Service FabricMicroservices with Azure Service Fabric
Microservices with Azure Service Fabric
Davide Benvegnù
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-Architect
DevOps.com
 
Azure servicefabric
Azure servicefabricAzure servicefabric
Azure servicefabric
Abhishek Sur
 
Disruptive Trends in Application Development
Disruptive Trends in Application DevelopmentDisruptive Trends in Application Development
Disruptive Trends in Application Development
WaveMaker, Inc.
 
Micro services
Micro servicesMicro services
Micro services
Brian Perera
 
Service fabric overview
Service fabric overviewService fabric overview
Service fabric overview
Himanshu Desai
 
Global Azure Bootcamp: Azure service fabric
Global Azure Bootcamp: Azure service fabric Global Azure Bootcamp: Azure service fabric
Global Azure Bootcamp: Azure service fabric
Luis Valencia
 
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
Tokyo Azure Meetup
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing Microservices
David Chou
 
Application Delivery Patterns for Developers - Technical 401
Application Delivery Patterns for Developers - Technical 401Application Delivery Patterns for Developers - Technical 401
Application Delivery Patterns for Developers - Technical 401
Amazon Web Services
 
Application Delivery Patterns
Application Delivery PatternsApplication Delivery Patterns
Application Delivery Patterns
Shiva Narayanaswamy
 
Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
Amazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
Amazon Web Services
 
Private PaaS & Container-as-a-Service for ISVs and Enterprise - Use Cases and...
Private PaaS & Container-as-a-Service for ISVs and Enterprise - Use Cases and...Private PaaS & Container-as-a-Service for ISVs and Enterprise - Use Cases and...
Private PaaS & Container-as-a-Service for ISVs and Enterprise - Use Cases and...
Dmitry Lazarenko
 
A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything Chef
Mandi Walls
 
Intro to Microservices Architecture
Intro to Microservices ArchitectureIntro to Microservices Architecture
Intro to Microservices Architecture
Peter Nijem
 
Un-clouding the cloud
Un-clouding the cloudUn-clouding the cloud
Un-clouding the cloud
Davinder Kohli
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
Eklove Mohan
 
Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...
Lucas Jellema
 
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
confluent
 

Similar to .NET microservices with Azure Service Fabric (20)

Microservices with Azure Service Fabric
Microservices with Azure Service FabricMicroservices with Azure Service Fabric
Microservices with Azure Service Fabric
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-Architect
 
Azure servicefabric
Azure servicefabricAzure servicefabric
Azure servicefabric
 
Disruptive Trends in Application Development
Disruptive Trends in Application DevelopmentDisruptive Trends in Application Development
Disruptive Trends in Application Development
 
Micro services
Micro servicesMicro services
Micro services
 
Service fabric overview
Service fabric overviewService fabric overview
Service fabric overview
 
Global Azure Bootcamp: Azure service fabric
Global Azure Bootcamp: Azure service fabric Global Azure Bootcamp: Azure service fabric
Global Azure Bootcamp: Azure service fabric
 
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
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing Microservices
 
Application Delivery Patterns for Developers - Technical 401
Application Delivery Patterns for Developers - Technical 401Application Delivery Patterns for Developers - Technical 401
Application Delivery Patterns for Developers - Technical 401
 
Application Delivery Patterns
Application Delivery PatternsApplication Delivery Patterns
Application Delivery Patterns
 
Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Private PaaS & Container-as-a-Service for ISVs and Enterprise - Use Cases and...
Private PaaS & Container-as-a-Service for ISVs and Enterprise - Use Cases and...Private PaaS & Container-as-a-Service for ISVs and Enterprise - Use Cases and...
Private PaaS & Container-as-a-Service for ISVs and Enterprise - Use Cases and...
 
A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything Chef
 
Intro to Microservices Architecture
Intro to Microservices ArchitectureIntro to Microservices Architecture
Intro to Microservices Architecture
 
Un-clouding the cloud
Un-clouding the cloudUn-clouding the cloud
Un-clouding the cloud
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...
 
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
 

More from Davide Benvegnù

DevSecOps Done Right - Strategies and Tools.pptx
DevSecOps Done Right - Strategies and Tools.pptxDevSecOps Done Right - Strategies and Tools.pptx
DevSecOps Done Right - Strategies and Tools.pptx
Davide Benvegnù
 
Secure Your Open Source Projects For Free
Secure Your Open Source Projects For FreeSecure Your Open Source Projects For Free
Secure Your Open Source Projects For Free
Davide Benvegnù
 
Microsoft Skills Bootcamp - The power of GitHub and Azure
Microsoft Skills Bootcamp - The power of GitHub and AzureMicrosoft Skills Bootcamp - The power of GitHub and Azure
Microsoft Skills Bootcamp - The power of GitHub and Azure
Davide Benvegnù
 
All Around Azure: DevOps with GitHub - Managing the Flow of Work
All Around Azure: DevOps with GitHub - Managing the Flow of WorkAll Around Azure: DevOps with GitHub - Managing the Flow of Work
All Around Azure: DevOps with GitHub - Managing the Flow of Work
Davide Benvegnù
 
CI CD per .Net 5? Facile con Azure Pipelines e GitHub Actions
 CI CD per .Net 5? Facile con Azure Pipelines e GitHub Actions  CI CD per .Net 5? Facile con Azure Pipelines e GitHub Actions
CI CD per .Net 5? Facile con Azure Pipelines e GitHub Actions
Davide Benvegnù
 
GitHub Actions: your free CI engine (and much more)
GitHub Actions: your free CI engine (and much more)GitHub Actions: your free CI engine (and much more)
GitHub Actions: your free CI engine (and much more)
Davide Benvegnù
 
Life of a Remote Developer - Productivity tips (MSBuild 2020)
Life of a Remote Developer - Productivity tips (MSBuild 2020)Life of a Remote Developer - Productivity tips (MSBuild 2020)
Life of a Remote Developer - Productivity tips (MSBuild 2020)
Davide Benvegnù
 
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Davide Benvegnù
 
Debugging and Interacting with Production Applications - MS Online Tech Forum
Debugging and Interacting with Production Applications - MS Online Tech ForumDebugging and Interacting with Production Applications - MS Online Tech Forum
Debugging and Interacting with Production Applications - MS Online Tech Forum
Davide Benvegnù
 
Architect your app modernization journey with containers on Microsoft Azure
Architect your app modernization journey with containers on Microsoft AzureArchitect your app modernization journey with containers on Microsoft Azure
Architect your app modernization journey with containers on Microsoft Azure
Davide Benvegnù
 
Build 2019 HK - Deep Dive notable announcements
Build 2019 HK - Deep Dive notable announcementsBuild 2019 HK - Deep Dive notable announcements
Build 2019 HK - Deep Dive notable announcements
Davide Benvegnù
 
How I choose which services to use in Azure
How I choose which services to use in AzureHow I choose which services to use in Azure
How I choose which services to use in Azure
Davide Benvegnù
 
Secure your applications with Azure AD and Key Vault
Secure your applications with Azure AD and Key VaultSecure your applications with Azure AD and Key Vault
Secure your applications with Azure AD and Key Vault
Davide Benvegnù
 
Develop a Serverless Integration Platform for the Enterprise
Develop a Serverless Integration Platform for the EnterpriseDevelop a Serverless Integration Platform for the Enterprise
Develop a Serverless Integration Platform for the Enterprise
Davide Benvegnù
 
SharePoint Disaster Recovery in Microsoft Azure
SharePoint Disaster Recovery in Microsoft AzureSharePoint Disaster Recovery in Microsoft Azure
SharePoint Disaster Recovery in Microsoft Azure
Davide Benvegnù
 
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
Davide Benvegnù
 
VS2017PI - Le novità di visual studio team services
VS2017PI - Le novità di visual studio team servicesVS2017PI - Le novità di visual studio team services
VS2017PI - Le novità di visual studio team services
Davide Benvegnù
 
Accelerate Your Bot Development with DevOps
Accelerate Your Bot Development with DevOpsAccelerate Your Bot Development with DevOps
Accelerate Your Bot Development with DevOps
Davide Benvegnù
 
Microsoft &lt;3 Open Source
Microsoft &lt;3 Open SourceMicrosoft &lt;3 Open Source
Microsoft &lt;3 Open Source
Davide Benvegnù
 
Continuous Integration: a real win-win for developers
Continuous Integration: a real win-win for developersContinuous Integration: a real win-win for developers
Continuous Integration: a real win-win for developers
Davide Benvegnù
 

More from Davide Benvegnù (20)

DevSecOps Done Right - Strategies and Tools.pptx
DevSecOps Done Right - Strategies and Tools.pptxDevSecOps Done Right - Strategies and Tools.pptx
DevSecOps Done Right - Strategies and Tools.pptx
 
Secure Your Open Source Projects For Free
Secure Your Open Source Projects For FreeSecure Your Open Source Projects For Free
Secure Your Open Source Projects For Free
 
Microsoft Skills Bootcamp - The power of GitHub and Azure
Microsoft Skills Bootcamp - The power of GitHub and AzureMicrosoft Skills Bootcamp - The power of GitHub and Azure
Microsoft Skills Bootcamp - The power of GitHub and Azure
 
All Around Azure: DevOps with GitHub - Managing the Flow of Work
All Around Azure: DevOps with GitHub - Managing the Flow of WorkAll Around Azure: DevOps with GitHub - Managing the Flow of Work
All Around Azure: DevOps with GitHub - Managing the Flow of Work
 
CI CD per .Net 5? Facile con Azure Pipelines e GitHub Actions
 CI CD per .Net 5? Facile con Azure Pipelines e GitHub Actions  CI CD per .Net 5? Facile con Azure Pipelines e GitHub Actions
CI CD per .Net 5? Facile con Azure Pipelines e GitHub Actions
 
GitHub Actions: your free CI engine (and much more)
GitHub Actions: your free CI engine (and much more)GitHub Actions: your free CI engine (and much more)
GitHub Actions: your free CI engine (and much more)
 
Life of a Remote Developer - Productivity tips (MSBuild 2020)
Life of a Remote Developer - Productivity tips (MSBuild 2020)Life of a Remote Developer - Productivity tips (MSBuild 2020)
Life of a Remote Developer - Productivity tips (MSBuild 2020)
 
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
 
Debugging and Interacting with Production Applications - MS Online Tech Forum
Debugging and Interacting with Production Applications - MS Online Tech ForumDebugging and Interacting with Production Applications - MS Online Tech Forum
Debugging and Interacting with Production Applications - MS Online Tech Forum
 
Architect your app modernization journey with containers on Microsoft Azure
Architect your app modernization journey with containers on Microsoft AzureArchitect your app modernization journey with containers on Microsoft Azure
Architect your app modernization journey with containers on Microsoft Azure
 
Build 2019 HK - Deep Dive notable announcements
Build 2019 HK - Deep Dive notable announcementsBuild 2019 HK - Deep Dive notable announcements
Build 2019 HK - Deep Dive notable announcements
 
How I choose which services to use in Azure
How I choose which services to use in AzureHow I choose which services to use in Azure
How I choose which services to use in Azure
 
Secure your applications with Azure AD and Key Vault
Secure your applications with Azure AD and Key VaultSecure your applications with Azure AD and Key Vault
Secure your applications with Azure AD and Key Vault
 
Develop a Serverless Integration Platform for the Enterprise
Develop a Serverless Integration Platform for the EnterpriseDevelop a Serverless Integration Platform for the Enterprise
Develop a Serverless Integration Platform for the Enterprise
 
SharePoint Disaster Recovery in Microsoft Azure
SharePoint Disaster Recovery in Microsoft AzureSharePoint Disaster Recovery in Microsoft Azure
SharePoint Disaster Recovery in Microsoft Azure
 
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
Microsoft TechSummit - Deploy your Solution to IaaS and PaaS with VSTS and Az...
 
VS2017PI - Le novità di visual studio team services
VS2017PI - Le novità di visual studio team servicesVS2017PI - Le novità di visual studio team services
VS2017PI - Le novità di visual studio team services
 
Accelerate Your Bot Development with DevOps
Accelerate Your Bot Development with DevOpsAccelerate Your Bot Development with DevOps
Accelerate Your Bot Development with DevOps
 
Microsoft &lt;3 Open Source
Microsoft &lt;3 Open SourceMicrosoft &lt;3 Open Source
Microsoft &lt;3 Open Source
 
Continuous Integration: a real win-win for developers
Continuous Integration: a real win-win for developersContinuous Integration: a real win-win for developers
Continuous Integration: a real win-win for developers
 

Recently uploaded

Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 

Recently uploaded (20)

Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 

.NET microservices with Azure Service Fabric

  • 1.
  • 2.
  • 3. Agenda • Microservices? • Service Fabric? • Microservices in Service Fabric? Demo code on GitHub: https://github.com/n3wt0n Slides on SlideShare: https://www.slideshare.net/n3wt0n
  • 4.
  • 5. What is a microservice? • Encapsulates a single capability • Are developed by a small engineering team • Can be written in any language and framework • Contain code plus state that is independently versioned, deployed, and scaled • Interact with other microservices over well defined interfaces and protocols such as http • Have a unique name (i.e. URL) that can be resolved • Remains consistent and available in the presence of failures • Ideal for DevOps automation!
  • 6. Reasons to split a monolith into services • Scaling independently (balancing cost with speed) • Supporting different technology stacks
  • 7. Reasons to split a monolith into services • Two or more clients, where clients adopt new features at will • Managing conflicting dependencies
  • 8. Are microservices right for my app? Maybe, if: • Your application can be split in many different, independent pieces • You need/want independent service scalability • You need/want to have multiple technologies, multiple teams involved • You are ready to change your DevOps practices and company culture But: • Any application that binds its components over a network connection introduces delays • Security and Authentication get more complex • Microservices are more complex to deploy, manage, and monitor • You cannot assume that you can take an arbitrary system and break it into microservices. Most systems acquire too many dependencies between their modules
  • 9. From Monolith to Microservices ... we support any stage you choose New or transformed microservices app 5 Parts of existing monolith extracted 4 Existing Monolith + new microservices 3 Monolith Hosted as guest executable or container 2 Traditional app 1 5 stages in a continuum…
  • 10. • Comparing an in-process call to an HTTP request • Performance: Worse & increases network congestion • Unpredictable time: Managing timeouts is challenging; pass deadlines • Unreliable: Requires retry loops with exponential backup/circuit breakers • Server code must be idempotent • Security: Requires authentication, authorization, & encryption • Debugging: network issues, perf counters/events/logs, causality/call stacks IntelliSense, refactoring & compile-time type-safety)
  • 11. IntelliSense, refactoring & compile-time type-safety)
  • 12.
  • 13. Proven platform powering core Azure and Microsoft services Microsoft has deep expertise in running global services such as Cortana, Skype & Cosmos DB Service Fabric is the foundational technology powering these services & core Azure infra Sample scale of one of these services: 60 billion events per day with millions of databases Production scenarios with 3500 VMs SQL { }Power BI Dynamics Intune Cortana Skype Cosmos DB IoT Hub Events Hub SQL Database
  • 14. Build: data-aware microservices Lifecycle Management Always On Availability Orchestration Programming Models Health & Monitoring Dev & Ops Tooling Auto Scaling Programming Models Dev & Ops Tooling Orchestration Lifecycle Management Health & Monitoring Always On Availability Auto Scaling .NET or Java … Built-in ASP.NET core integration; work with VS and VSTS or Eclipse and Jenkins Reliable Services Manage state reliability without a database, lowering latency Guest Executables Run existing code and orchestrate life cycle using service fabric Reliable Actors Implementation of actor design pattern (Isolated, independent unit of compute and state with single- threaded execution) Containers Orchestrate your Windows Server or Linux containers reliably at scale </>
  • 15. Deploy: any code on any OS Lifecycle Management Always On Availability Orchestration Programming Models Health & Monitoring Dev & Ops Tooling Auto Scaling Programming Models Dev & Ops Tooling Orchestration Lifecycle Management Health & Monitoring Always On Availability Auto Scaling Monitor and diagnose Generate, aggregate, and analyze events with built-in tooling and integration with Azure services Docker Compose Orchestrate existing container applications natively Automate Deploy or remove applications using PowerShell, CLI, Visual Studio, and other APIs CI/CD Maximize uptime and scalability with isolated compute threads running concurrently Rolling upgrades Upgrade non-disruptively and roll-back in case of failures, automate with PowerShell
  • 16. Operate: on any cloud at any scale Lifecycle Management Always On Availability Orchestration Programming Models Health & Monitoring Dev & Ops Tooling Auto Scaling Programming Models Dev & Ops Tooling Orchestration Lifecycle Management Health & Monitoring Always On Availability Auto Scaling Scale programmatically Use PowerShell, CLI, or APIs to scale programmatically achieving very high densities Use controlled chaos Test graceful and ungraceful failure scenarios Recover gracefully Recover from node or service failure gracefully; replicate data automatically Use familiar tools Such as Splunk, OMS, ELK, or AppInsights to gain deep insights or monitor application health Secure at scale Secure node-to-node communication and user access using built-in capabilities
  • 17.
  • 18. Awesome for developers Use .NET, Java or more • Stateless and Stateful services • ASP.NET core integration Visual studio integration • Use single node cluster for dev/test purposes • Use 5-node local cluster for extensive dev/test Consistent experience across environments • Run the same environment on dev box as in production
  • 19. Awesome for dev-ops Automated deployment • Use PowerShell, Service Fabric CLI or APIs Rolling upgrades for reliability • Upgrade your services in an automated fashion Visual studio team services integration • For continuous integration and deployment Integration with Jenkins and more • Use tools familiar to you for deploying Java applications
  • 20. Awesome for infrastructure management Cluster management • Secure your clusters and handle failures gracefully • Scale clusters programmatically or manually • Ease maintenance with integrated OS patching PowerShell, CLI, and GUI management • Be productive and choose tools that suit your needs Applications as an ARM resource • Manage clusters as well as deploy app using templates Health monitoring • Monitor using integrated or 3rd party tool of your choice • Query health using PowerShell or APIs programmatically
  • 21.
  • 22.
  • 23.
  • 24.
  • 27. • All API requests must pass version info starting with v1 • New service versions must be backward compatible • What about intra-service instance requests? • During rolling update, old & new service instances run together • Failure occurs if v2 instance makes v2 API request to v1 service instance • Fix by performing a 2-phase update 1. Deploy v2 service instances (which accept v2 & v1 API requests) • But never send v2 API requests 2. After all instances are v2, reconfigure instances to send v2 API requests • OPTIONAL: After all instances upgraded, deploy again with v1 code removed
  • 28.
  • 29.
  • 30. • Services start/stop, scale up/down, & crash/move • Each instance has its own endpoint (dynamically-assigned IP/port) • Clients must dynamically discover service instance endpoints and load balance between them • Beware: a new service instance could be assigned a previous instance’s endpoint • This requires certificates or some ID/uniqueness so client knows which service it’s communicating with
  • 31. Who is App1/Service1?There you go: 10.0.0.8:1234
  • 33.
  • 34.
  • 36. Stateless microservices pattern Load Balancer Front End (Stateless Web) Stateless Middle-tier Compute Cache StorageQueues
  • 37. Stateless microservices pattern • Stateless services can have an external endpoint • Configure the endpoint in ServiceManifest.xml (especially the port) • For external accessible services, remember to configure Load Balancer • Stateless service instances are equivalent and activated “randomly”
  • 38.
  • 39. Stateful microservices pattern Load Balancer Front End (Stateless Web) Stateful Middle-tier Compute Cold Data Stores (Optional)
  • 40. Stateful microservices pattern • Stateful services cannot have an external endpoint • Stateful services must specify partitions • Stateful service instances are not equivalent and not activated “randomly” • Stateful services use Reliable Collections to persist the data
  • 41. Reliable collections • Reliable collections make it easy to build stateful services. • An evolution of .NET collections for the cloud. Collections • Single machine • Single threaded Concurrent collections • Single machine • Multi threaded Reliable collections • Multi machine • Replicated (HA) • Persistence (durable) • Asynchronous • Transactional
  • 42.
  • 43. Some notes… • Development • Service communication
  • 44.
  • 45. References Demo Code and Slides https://github.com/n3wt0n https://www.slideshare.net/n3wt0n Service Fabric Reference Documentation https://docs.microsoft.com/en-us/azure/service-fabric/ Service Fabric Reference Architecture https://docs.microsoft.com/en-us/azure/architecture/guide/architecture- styles/microservices#microservices-using-azure-service-fabric

Editor's Notes

  1. https://www.thoughtworks.com/insights/blog/implementing-blue-green-deployments-aws
  2. Scale stateless services backed by partitioned storage Increase reliability and ordering with queues Reduce read latency with caches Manage your own transactions for state consistency
  3. Stateful services eliminate much of the latency and complexity in applications that uses the stateless pattern and are unique to Service Fabric. Application state resides in the compute tier Low latency reads and writes Partitions are first class at the service layer for scale-out Built in transactions External stores for exhaust and offline analytics