SlideShare a Scribd company logo
Microservices and Azure Service
Fabric
Luis Esteban Valencia –
MVP
www.luisevalencia.com
Twitter: @levalencia
le.valencia@outlook.com
TWEET NOW
@levalencia Hablando sobre Service Fabric en
#globalazure #gabcmed
Topics
Introducing Microservices & Azure Service Fabric
Service Fabric Concepts
Developing Service Fabric Applications
Deployments & Upgrades
Introducing Microservices &
Azure Service Fabric
Microservices Architecture
• An evolution of Service Oriented Architecture
• Create a system as a suite of small, independently
deployable services
• Services communicate across lightweight protocols
• Considerations
• Services can be scaled to meet their individual needs
• Supports use of different technology stacks for
different system parts
• Process automation is important (DevOps)
UI/UX
Storage
Storage
Business
Logic
Business
Logic
1...n
Monolithic Architecture
UI/UX
StorageStorage
Shopping
Cart
AuthN
Microservice Architecture
Storage
Product
Catalog
Azure Service Fabric
• Can be thought of as an orchestrator of services across a
managed cluster of machines
• Good for microservices, but not only
• Can be run in Azure, on-premises, or in other clouds
• Proven platform used by several Microsoft Cloud services,
including:
• Azure SQL Database
• Document DB
• Cortana
• Microsoft Power BI
• Microsoft Intune
• Azure Event Hubs
• Azure IoT Hub
• Skype for Business
Service Fabric Concepts
Service Fabric Concepts
Application
Service Service Service
Node Node Node Node
Cluster
Partitions
Service Models
Reliable Service & Reliable
Actor Services
• Leverage Service Fabric’s
own programming
models
• Networking Naming
Service support
• Integrate with code,
configuration, and data
upgrades
• Instances are not process
isolated for each instance,
but instead are created as
objects (higher density on
host.)
Guest Executable Services
• Arbitrary executable
packaged in a Service
Fabric service
• Can be written in any
language
• Service Fabric manages
orchestration and
execution management of
the executable
• Limited integration with
the Service Fabric APIs
Container Services
• Containers can either be
Reliable Services or Guest
Containers
• Supports Docker
Containers (Linux) and
Windows Server
Containers
• Currently in Preview
Reliable Services
Stateless Service
• Typically used for Web API front-
ends or background workers that
look at external queues
• No state is maintained within the
service, though external state
storage can certainly be used
Stateful Service
• Used when state must be
consistent and present for the
service to function
• Leverages the Reliable Collections
• ReliableQueue, ReliableDictionary
• State is kept locally, but replicated
for high-availability, backed with
disk storage for durability, and
transactional.
Azure Cloud Services
(Web & Worker Roles)
Azure Service Fabric
(Services)
• Each role/instance per VM
• Slow deployment & upgrades
• Slow to scale role instances up/down
• Emulator for development
• Many service instances share a PC/VM
• Fast deployment & upgrades
• Fast to scale service instances up/down
• OneBox cluster for development
Cloud Services vs Service Fabric
Datacenter (Azure, Amazon, On-Premises, …)
Load
Balancer
PC/VM #1
Service Fabric
Your code, etc.
PC/VM #2
Service Fabric
Your code, etc. PC/VM #3
Service Fabric
Your code, etc.
PC/VM #4
Service Fabric
Your code, etc.
PC/VM #5
Service Fabric
Your code, etc.
Service Fabric Cluster with 5 Nodes
Your code, etc.
(Port: 19080)
Web Request
(Port: 80/443/?)
*SF supports 1,000s of nodes
Cluster Manager (ports 19080 [REST] & 19000 [TCP])
Performs cluster REST & PowerShell/FabricClient operations
Failover Manager
Rebalances resources as nodes come/go
Naming
Maps service instances to endpoints
Image store (not on OneBox)
Contains your Application packages
Upgrade Service (Azure only)
Coordinates upgrading SF itself with Azure’s SFRP
Service Fabric’s Infrastructure Services
Node #1
F
Node #2
C N I
Node #3
C F
Node #4
N I
Node #5
C
I
F
N
U
U
U
N F U
IC
PC/VM
FabricHost.exe
[Auto-starts at boot]
Fabric.exe
[Inter-node communication]
Your App’s Services
Ex: ASP.NET or other .exe
[Exposes public endpoint(s)]
FabricGateway.exe
[Cluster communication]
N
o
d
e
Node Processes
OneBox
[testing]
Fabric.exe
[Inter-node communication]
Your App’s Services
Ex: ASP.NET or other .exe
[Exposes public endpoint(s)]
FabricGateway.exe
[Cluster communication]
N
o
d
e
Developing Service Fabric
Applications
Windows Setup
Installation
The Microsoft Azure Service Fabric SDK is included in the “Azure
development” Workload in the Visual Studio 2017 installer
Creating a Project
• Create a new project by selecting the “Service Fabric
Application” template from either the Cloud project node.
• Choose your desired service type template
Solution Structure
• Application Project
• The Services node lists the service projects that
make up the Application
• Includes an Application Manifest that describes the
services that make up the Application
• Includes application publishing profiles, and per-
profile settings.
• Service Project(s)
• Includes a Service Manifest that describes the
Service characteristics
• Includes the Service code and configuration
Service Fabric Local Cluster
• Installed as part of the Service Fabric SDK
• Provides a local debug & test environment
• Can provision a 1-node or 5-node cluster
• Not an emulator or a simulator
• Can be managed via the Windows System Tray
application or via PowerShell scripts.
• Visual Studio is configured to work with the
Local Cluster
Service Fabric Explorer
Deployments & Upgrades
Deploying in Azure
• Service Fabric Applications are deployed in Azure into a Virtual
Machine Cluster in a Virtual Machine Scale Set (VMSS)
• Clusters can be created on VMs running Windows Server 2012 R2,
Windows Server 2016, or Linux Ubuntu 16.04 (in preview)
• Clusters networking can be configured via Azure VNets, Subnets,
Public IP Addresses, and internal and/or external load balancing
• Can be managed with Azure ARM templates,
• Auto-scaling support is provided by Azure VMSS
• Management is via a combination of Azure tools and Service Fabric
tools
Application Deployments
• Two types of deployments in Service Fabric – Full and Upgrade
• In a Full Deployment, the entire application is torn down (if
already present) and then a new application instance is
deployed.
• Upgrade Deployments
• Service Fabric supports rolling upgrades to maintain uptime
• Service Fabric monitors application health during the upgrade. If the
system violates the application health policy, the upgrade is rolled back.
• Several modes govern the automation and health-check behavior
during an upgrade.
Video Demo
#
Preguntas
1. Cuales son los 5 servicios de infraestructura
de Service Fabric.
2. 3 Servicios de Azure que hayan sido
desarrollados con service fabric.
#

More Related Content

PPTX
Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
PPTX
Tokyo Azure Meetup #4 - Build 2016 Overview
PPTX
Deep dive into service fabric after 2 years
PPTX
Azure service fabric
PPTX
Tokyo Azure Meetup #6 - Azure Monthly Update - June
PPTX
Tokyo azure meetup #12 service fabric internals
PPTX
Azure servicefabric
PDF
Microservices to Scale using Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #4 - Build 2016 Overview
Deep dive into service fabric after 2 years
Azure service fabric
Tokyo Azure Meetup #6 - Azure Monthly Update - June
Tokyo azure meetup #12 service fabric internals
Azure servicefabric
Microservices to Scale using Azure Service Fabric

What's hot (20)

PPTX
Azure Service Fabric
PPTX
Devteach 2016: A practical overview of actors in service fabric
PPTX
Azure Service Fabric Overview
PPTX
Azure service fabric: a gentle introduction
PPTX
Microservices in Azure
PPTX
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
PPTX
MicroServices on Azure
PPTX
Microservices with Azure Service Fabric
PPTX
Serverless: The future of application delivery
PPTX
Micro services
PDF
Distributed Computing made easy with Service Fabric
PDF
Microservice and Service Fabric talk
PDF
Azure paa s v2 – microservices, microsoft (azure) service fabric, .apps and o...
PDF
Continuous Delivery, DevOps, Cloud - New Requirements for New Architectures
PPTX
Exploring Microservices in a Microsoft Landscape
PPTX
Banking and Docker Datacenter - How Containers Drive Agility
PPTX
Enter The Matrix Securing Azure’s Assets
ODP
micro services architecture (FrosCon2014)
PPTX
Azure Reference Architectures
PDF
Self-contained Systems: A Different Approach to Microservices
Azure Service Fabric
Devteach 2016: A practical overview of actors in service fabric
Azure Service Fabric Overview
Azure service fabric: a gentle introduction
Microservices in Azure
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
MicroServices on Azure
Microservices with Azure Service Fabric
Serverless: The future of application delivery
Micro services
Distributed Computing made easy with Service Fabric
Microservice and Service Fabric talk
Azure paa s v2 – microservices, microsoft (azure) service fabric, .apps and o...
Continuous Delivery, DevOps, Cloud - New Requirements for New Architectures
Exploring Microservices in a Microsoft Landscape
Banking and Docker Datacenter - How Containers Drive Agility
Enter The Matrix Securing Azure’s Assets
micro services architecture (FrosCon2014)
Azure Reference Architectures
Self-contained Systems: A Different Approach to Microservices
Ad

Similar to Global Azure Bootcamp: Azure service fabric (20)

PPTX
Azure Stack - Azure Nights User Group
PPTX
Azure service fabric overview
PPTX
Designing Microservices
PPTX
.NET microservices with Azure Service Fabric
PDF
Sitecore 8.2 Update 1 on Azure Web Apps
PPTX
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
PPTX
Service fabric overview
PPTX
Microservices in Azure
PDF
Azure Service Fabric - Hamida Rebai - CCDays
PDF
Introduction to Windows Azure
PPTX
NIC - Windows Azure Pack - Level 300
PPTX
Patterns for building resilient and scalable microservices platform on AWS
PPTX
Azure realtime-interview questions - part 7
PDF
Service fabric and azure service fabric mesh
PPTX
Tokyo azure meetup #8 - Azure Update, August
PPTX
Tokyo azure meetup #8 azure update, august
PPTX
Microsoft Azure News - Oct 2016
PPTX
Exploring microservices in a Microsoft landscape
PPTX
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
PDF
AppSphere 15 - Microsoft Azure for Developers & DevOps
Azure Stack - Azure Nights User Group
Azure service fabric overview
Designing Microservices
.NET microservices with Azure Service Fabric
Sitecore 8.2 Update 1 on Azure Web Apps
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Service fabric overview
Microservices in Azure
Azure Service Fabric - Hamida Rebai - CCDays
Introduction to Windows Azure
NIC - Windows Azure Pack - Level 300
Patterns for building resilient and scalable microservices platform on AWS
Azure realtime-interview questions - part 7
Service fabric and azure service fabric mesh
Tokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 azure update, august
Microsoft Azure News - Oct 2016
Exploring microservices in a Microsoft landscape
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
AppSphere 15 - Microsoft Azure for Developers & DevOps
Ad

More from Luis Valencia (14)

PPTX
Bdug introduction to azure machine learning
PPTX
Introduccion a azure cognitive search. e integracion con sharepoint office 36...
PPTX
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
PPTX
Sharepoint framework nivel avanzado
PPTX
Microsoft Graph Meetup Medellin
PPTX
Introducción a IoT Con NodeJS y IoT Hub
PPTX
Sharepoint framework nivel avanzado
PPTX
Luis valencia introduction to share point webhooks
PPTX
Micro services architecture and service fabric
PPTX
Sharepoint Search 2013 Back to Front
PPTX
Introduccion a sharepoint framework
PPTX
Getting started with Office 365 APIs
PPTX
Moving full trust code to the cloud using repeatable patterns and best practices
PPTX
Charla desarrollo de apps con sharepoint y office 365
Bdug introduction to azure machine learning
Introduccion a azure cognitive search. e integracion con sharepoint office 36...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Sharepoint framework nivel avanzado
Microsoft Graph Meetup Medellin
Introducción a IoT Con NodeJS y IoT Hub
Sharepoint framework nivel avanzado
Luis valencia introduction to share point webhooks
Micro services architecture and service fabric
Sharepoint Search 2013 Back to Front
Introduccion a sharepoint framework
Getting started with Office 365 APIs
Moving full trust code to the cloud using repeatable patterns and best practices
Charla desarrollo de apps con sharepoint y office 365

Recently uploaded (20)

PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Nekopoi APK 2025 free lastest update
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPT
Introduction Database Management System for Course Database
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
top salesforce developer skills in 2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
medical staffing services at VALiNTRY
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Digital Strategies for Manufacturing Companies
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Transform Your Business with a Software ERP System
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
2025 Textile ERP Trends: SAP, Odoo & Oracle
Online Work Permit System for Fast Permit Processing
ISO 45001 Occupational Health and Safety Management System
Nekopoi APK 2025 free lastest update
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Introduction Database Management System for Course Database
Navsoft: AI-Powered Business Solutions & Custom Software Development
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
top salesforce developer skills in 2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
medical staffing services at VALiNTRY
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Digital Strategies for Manufacturing Companies
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Design an Analysis of Algorithms I-SECS-1021-03
PTS Company Brochure 2025 (1).pdf.......
Design an Analysis of Algorithms II-SECS-1021-03
Transform Your Business with a Software ERP System
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
How to Migrate SBCGlobal Email to Yahoo Easily

Global Azure Bootcamp: Azure service fabric

  • 1. Microservices and Azure Service Fabric Luis Esteban Valencia – MVP www.luisevalencia.com Twitter: @levalencia le.valencia@outlook.com
  • 2. TWEET NOW @levalencia Hablando sobre Service Fabric en #globalazure #gabcmed
  • 3. Topics Introducing Microservices & Azure Service Fabric Service Fabric Concepts Developing Service Fabric Applications Deployments & Upgrades
  • 5. Microservices Architecture • An evolution of Service Oriented Architecture • Create a system as a suite of small, independently deployable services • Services communicate across lightweight protocols • Considerations • Services can be scaled to meet their individual needs • Supports use of different technology stacks for different system parts • Process automation is important (DevOps) UI/UX Storage Storage Business Logic Business Logic 1...n Monolithic Architecture UI/UX StorageStorage Shopping Cart AuthN Microservice Architecture Storage Product Catalog
  • 6. Azure Service Fabric • Can be thought of as an orchestrator of services across a managed cluster of machines • Good for microservices, but not only • Can be run in Azure, on-premises, or in other clouds • Proven platform used by several Microsoft Cloud services, including: • Azure SQL Database • Document DB • Cortana • Microsoft Power BI • Microsoft Intune • Azure Event Hubs • Azure IoT Hub • Skype for Business
  • 8. Service Fabric Concepts Application Service Service Service Node Node Node Node Cluster Partitions
  • 9. Service Models Reliable Service & Reliable Actor Services • Leverage Service Fabric’s own programming models • Networking Naming Service support • Integrate with code, configuration, and data upgrades • Instances are not process isolated for each instance, but instead are created as objects (higher density on host.) Guest Executable Services • Arbitrary executable packaged in a Service Fabric service • Can be written in any language • Service Fabric manages orchestration and execution management of the executable • Limited integration with the Service Fabric APIs Container Services • Containers can either be Reliable Services or Guest Containers • Supports Docker Containers (Linux) and Windows Server Containers • Currently in Preview
  • 10. Reliable Services Stateless Service • Typically used for Web API front- ends or background workers that look at external queues • No state is maintained within the service, though external state storage can certainly be used Stateful Service • Used when state must be consistent and present for the service to function • Leverages the Reliable Collections • ReliableQueue, ReliableDictionary • State is kept locally, but replicated for high-availability, backed with disk storage for durability, and transactional.
  • 11. Azure Cloud Services (Web & Worker Roles) Azure Service Fabric (Services) • Each role/instance per VM • Slow deployment & upgrades • Slow to scale role instances up/down • Emulator for development • Many service instances share a PC/VM • Fast deployment & upgrades • Fast to scale service instances up/down • OneBox cluster for development Cloud Services vs Service Fabric
  • 12. Datacenter (Azure, Amazon, On-Premises, …) Load Balancer PC/VM #1 Service Fabric Your code, etc. PC/VM #2 Service Fabric Your code, etc. PC/VM #3 Service Fabric Your code, etc. PC/VM #4 Service Fabric Your code, etc. PC/VM #5 Service Fabric Your code, etc. Service Fabric Cluster with 5 Nodes Your code, etc. (Port: 19080) Web Request (Port: 80/443/?) *SF supports 1,000s of nodes
  • 13. Cluster Manager (ports 19080 [REST] & 19000 [TCP]) Performs cluster REST & PowerShell/FabricClient operations Failover Manager Rebalances resources as nodes come/go Naming Maps service instances to endpoints Image store (not on OneBox) Contains your Application packages Upgrade Service (Azure only) Coordinates upgrading SF itself with Azure’s SFRP Service Fabric’s Infrastructure Services Node #1 F Node #2 C N I Node #3 C F Node #4 N I Node #5 C I F N U U U N F U IC
  • 14. PC/VM FabricHost.exe [Auto-starts at boot] Fabric.exe [Inter-node communication] Your App’s Services Ex: ASP.NET or other .exe [Exposes public endpoint(s)] FabricGateway.exe [Cluster communication] N o d e Node Processes OneBox [testing] Fabric.exe [Inter-node communication] Your App’s Services Ex: ASP.NET or other .exe [Exposes public endpoint(s)] FabricGateway.exe [Cluster communication] N o d e
  • 16. Installation The Microsoft Azure Service Fabric SDK is included in the “Azure development” Workload in the Visual Studio 2017 installer
  • 17. Creating a Project • Create a new project by selecting the “Service Fabric Application” template from either the Cloud project node. • Choose your desired service type template
  • 18. Solution Structure • Application Project • The Services node lists the service projects that make up the Application • Includes an Application Manifest that describes the services that make up the Application • Includes application publishing profiles, and per- profile settings. • Service Project(s) • Includes a Service Manifest that describes the Service characteristics • Includes the Service code and configuration
  • 19. Service Fabric Local Cluster • Installed as part of the Service Fabric SDK • Provides a local debug & test environment • Can provision a 1-node or 5-node cluster • Not an emulator or a simulator • Can be managed via the Windows System Tray application or via PowerShell scripts. • Visual Studio is configured to work with the Local Cluster
  • 22. Deploying in Azure • Service Fabric Applications are deployed in Azure into a Virtual Machine Cluster in a Virtual Machine Scale Set (VMSS) • Clusters can be created on VMs running Windows Server 2012 R2, Windows Server 2016, or Linux Ubuntu 16.04 (in preview) • Clusters networking can be configured via Azure VNets, Subnets, Public IP Addresses, and internal and/or external load balancing • Can be managed with Azure ARM templates, • Auto-scaling support is provided by Azure VMSS • Management is via a combination of Azure tools and Service Fabric tools
  • 23. Application Deployments • Two types of deployments in Service Fabric – Full and Upgrade • In a Full Deployment, the entire application is torn down (if already present) and then a new application instance is deployed. • Upgrade Deployments • Service Fabric supports rolling upgrades to maintain uptime • Service Fabric monitors application health during the upgrade. If the system violates the application health policy, the upgrade is rolled back. • Several modes govern the automation and health-check behavior during an upgrade.
  • 25. Preguntas 1. Cuales son los 5 servicios de infraestructura de Service Fabric. 2. 3 Servicios de Azure que hayan sido desarrollados con service fabric. #

Editor's Notes

  • #4: Objective: Discuss the agenda for the deck Notes: The deck is broken into 4 sections that discuss: An Introduction to Azure Service Fabric and the Microservices Architecture Pattern A discussion of the key Service Fabric concepts Getting Started with the development tools for Azure Service Fabric An overview of deployment and upgrade concepts
  • #5: Objective: This section will provide a high-level introduction to Azure Service Fabric and to the Microservices Architecture pattern.
  • #6: Objective: To provide an initial explanation of what a Microservices architecture entails Notes: The Microservices architecture is an evolution of the older Service Oriented Architecture (SOA) pattern, building on top of the rapid develop/test/deploy cycles that have arisen due to advances in both technology and project process management. In a Traditional “Monolithic” solution, a system will often be made up of large self-contained applications which are scaled as a group. Storage is often a single entity – albeit with some redundancy – and is scoped to address the entire set of application needs. Application segmentation usually takes the form of modules, libraries, or other platform artifacts that allow some segregation of implementation, but nonetheless, the application is both deployed and scaled as a single fixed unit. In a “Microservices Architecture”, the system is deployed as a suite of smaller, independent services which communicate over lightweight protocols such as HTTP or TCP. These smaller units can be developed and deployed independently, including support for using different platforms/languages/technologies to do so. As long as the contracts between the services are enforced (or otherwise managed), different parts of the application can be developed, deployed, and scaled independently of each other. Furthermore, storage is typically scoped just to the service that needs it, offering perhaps more nuanced choices for using different kinds of storage for different parts of the solution. Of course, with this added flexibility comes some additional responsibility – there are more individual units to deploy and manage. A good DevOps pipeline greatly facilitates the ability for a team to manage the additional complexity involved in the Microservices approach to distributing an application’s functionality.
  • #7: Objective: To provide a high level description of Azure Service Fabric Notes: Azure Service Fabric is a platform that manages or orchestrates one or several services across a cluster of machines. As such it is an ideal fit for applications that are designed around a Microservices architecture, though it can also accommodate other application architectures as well. Service Fabric solutions can be deployed into Microsoft Azure, on-premises, or even in other vendors clouds, though there is additional tooling and support when deployed in Microsoft Azure. As you can see, Service Fabric is not just a tool that is being made available to Azure customers, it is also a key part of the underpinnings of several components of the Microsoft Cloud, including the list shown here, among several others.
  • #8: Objective: This section will discuss several key Service Fabric Concepts, including the application and service models.
  • #9: Objective: Present the Core Concepts that make up a Service Fabric Application Notes: A Service Fabric Application is made up of a collection of Services, where each service id responsible for performing some distinct function. Services are composed of Code, Configuration, and Data, where code is the executable binaries, configuration consists of the service settings that affect its runtime behavior, and data is any arbitrary static data that the service will consume at runtime. Service Fabric supports several different Service models, and can be categorized as being either Stateful Services or Stateless Services (the different service models will be discussed in an upcoming slide.) At runtime, services are deployed into a Cluster, where a cluster is a scalable collection made up of a set of either physical or virtual machines. Each machine (physical or virtual) that is part of a cluster is called a Node. Service Fabric manages distribution of services across the cluster based on placement criteria identified in the service’s configuration and also on the application’s resource balancing needs. The configuration for each service will include a partition scheme for that service, as well as instance and/or replica counts. Services can split data and processing across multiple partitions, which are then spread out across the nodes in a cluster. Stateless services have instances, whereas stateful services have replicas. Instances provide availability, in that in the event of a failure of one instance, the other instances continue to function. Replicas keep the state for a service in sync across multiple partitions; should one replica fail, one of the others will take its place and a new replica will be created.
  • #10: Objective: To introduce the available models for service development in Azure Service Fabric Notes: There are 3 general categories of services that Azure Service Fabric can manage – “Reliable Service & Reliable Actor Applications”, “Guest Executable Applications”, and “Container Applications”. Reliable Service & Reliable Actor Services are built on top of .NET SDK frameworks provided by Azure Service Fabric. As such, they have programmatic access to service and service-fabric functionality. This includes accessing the Service Fabric Naming Service (resolve service instance URL by name) and integration with the instance lifecycle events, among others. Additionally, service instances are create as objects under the management of Service Fabric, instead of individual processes, which allows for higher density within the host cluster. These models will be discussed more in detail shortly. Guest Executable Services allow you to create a service that hosts an arbitrary executable. This executable can be written in any language you choose, and Service Fabric will take care of execution management tasks like ensuring the application is running and other orchestration tasks. Because guest executables are not built on top of the Service Fabric APIs, they have limited access internally to the Service Fabric functionality. Container Services can be thought of as an application-within-an-application, in that multiple services can be placed within a container. This includes supporting Reliable Services which include Stateless Services within a container (Linux only), Stateful Services within a container (Windows only), or arbitrary guest executables within a container. Additional Information: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-deploy-existing-app https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-containers-overview
  • #11: Objective: To introduce the Reliable Service programming models available in Azure Service Fabric Notes: Azure Service Fabric supports 2 different Reliable Service programming models – Stateless Service and Stateful Service (along with the Stateful Actor framework, to be discussed shortly.) Stateless services (as the name implies) do not include provisions for handling in-process state. Note that a stateless service *can* maintain state, it is just that the programming framework does not provide any tooling to that end. The state must be persisted to some external storage mechanism (like a database), and is not dissimilar from a typical stateless web application design. Stateful services include access to in-process state. The stateful information is both replicated and persisted to disk. Additionally, the stateful collections that are managed by Stateful Services also support transactions to ensure consistent operations. Additional Information: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-introduction
  • #12: Objective: To introduce the concept and impact of Partitioning in a Stateless Service Notes: Let’s take a look at the different Reliable Services and see how Partitioning allows Service Fabric to provide reliability and scalability. Since Stateless Services have no inherent state, the reliability and scalability come simply from numbers. Reliability exists because if one instance goes down, there are still other instances present to handle the load. Scalability is present because adding (or removing) nodes allows the service to handle additional (or reduced) volume. Here we have a Stateless Service running in 3 Partitions distributed across 3 Nodes. (Animation) If we add two more Nodes to the service, Service Fabric simply also create two additional service instances.
  • #13: Objective: To introduce the concept and impact of Partitioning in a Stateful Service Notes: Providing scalability and reliability is a little trickier in a Stateful Service. In order to do so, we need to maintain distributed replicas of the state in each partition, keeping track of a primary Partition and a number of Secondary Partitions. Reliability exists because if Service Fabric is aware of a single node going down, it can rebalance using the Secondary partition replicas located on other nodes, promoting them to Primary nodes as necessary and creating new additional Secondary replicas. Scalability is present as long as the number of Nodes approaches the number of Partitions (when scaling up.) Once you have more Nodes than Partitions, the additional Nodes do not generally contribute to expanded capacity in the system. Here we have a Stateful Service running in 5 Partitions with 3 Replicas per partition, distributed across 3 Nodes. (Animation) If we add two more Nodes to the service, Service Fabric rebalances the existing partitions, easing the load on the original 3 Nodes.
  • #14: Objective: To introduce the Reliable Actors framework available in Azure Service Fabric development Notes: The Reliable Actors framework is a Virtual Actor implementation that is built on top of stateful Reliable Services. In a Virtual Actor implementation, an Actor is a unit of both logic and state that is managed by the framework. Client applications reference an actor by a unique ID. The framework manages the allocation and lifetime of individual actor instances, including “resurrecting” an actor instance which has gone dormant due to a period of inactivity. Actor instances provide a turn-based, single-threaded access model, making it possible to not have to deal with concurrency issues in a distributed programming model. With this single-threaded behavior, Timers and Reminders both offer support for running code after a function call has completed. Timers and reminders differ mainly in that Timers cannot “re-awaken” a time-expired actor, whereas Reminders will continue to execute, “waking” a dormant actor instance as necessary, until the actor unregisters the reminder or the actor is explicitly deleted. Finally, actors also support raising events back to the calling application. Because of the nature of distributed programming, these events are not strictly guaranteed to reach their listeners (if reliable messaging is required, a queue-based or similar solution is recommended.) Additional Information: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-actors-introduction
  • #19: Objective: Introduces the concepts related to developing Service Fabric projects with Visual Studio 2017 on Windows. For Linux, see https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-linux For Mac OS, see https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-mac
  • #20: Objective: Show what needs to be done to install the Service Fabric SDK and development tools in Visual Studio 2017 Notes: The Visual Studio 2017 features a different take on the previous Visual Studio installers, where “Features” are replaced by “Workloads.” To install the Service Fabric tools in Visual Studio 2017, you select the “Azure development” workload from the “Web & Cloud” section in the installer. For Visual Studio 2015, see https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started Note – in Visual Studio 2015, the Azure Service Fabric SDK and tools were deployed and updated via the Web Platform Installer. In Visual Studio 2017, these components have been moved to be part of the installation and update process for Visual Studio itself.
  • #21: Objective: To show how to start a new Azure Service Fabric project in Visual Studio 2017 Notes: To create a new Azure Service Fabric project in Visual Studio 2017, select File/New Project, then select the “Service Fabric Application” option from the “Cloud” node. Notice the various Service project types that can be created: Stateless & Stateful Reliable Services An Actor Service A Stateless Reliable Service provisioned with ASP.NET WebAPI endpoints A Guest Executable Service A Container Service (in Preview) A Stateless Reliable Service provisioned with ASP.NET Core (this project can also be used for web projects that include user interface elements.)
  • #22: Objective: To explain the folder and content layout of a typical Service Fabric solution Notes: When you create a new Service Fabric project in Visual Studio, your solution will be set up with at least 2 projects, each containing several important files. Each solution will include one Application Project (ServiceFabricDemo in the illustration) This project includes the configuration for the overall Application managed by Service Fabric (an application can include one or more services) The services node lists the services that have been included in this application – you can open this node and add or remove services The key file in this project is the Application Manifest file. This file identifies both the application type and the application version, and specifies the services that will make up the application as well as how the applications will be laid out in the Service Fabric cluster. The project also includes one or more Publishing Profiles which enable setting different application configurations for different deployment environments (for example, local deployment vs a cloud-based test cluster vs a cloud –based production environment.) Each solution will include one or more Service Projects (DemoStatelessApi in the illustration) This project includes the configuration for the overall Application managed by Service Fabric (an application can include one or more services) These projects will each include their own Service Manifest files, with the Service Manifest describing the service type, version, and other configuration options This project will also include the service’s code and configuration files
  • #23: Objective: To discuss the Service Fabric Local Cluster for local development Notes: The Service Fabric Local Cluster is included as part of the Azure Service Fabric SDK, and is meant to provide you with a complete local development and testing environment in order to accelerate your developing and deploying Service Fabric applications. The Local Cluster allows you to stand up either a 1-node or 5-node clusters – 1 node clusters are quicker to provision and deploy, but 5-node clusters are closer to real-world deployments. It’s important to note that this isn’t an emulator or simulator; the Local Cluster runs the same Service Fabric runtime that you will use in your production deployments. You can manage the Local Cluster with the Local Cluster Manager app that will be present in your Windows System Tray after you install the Service Fabric SDK, or you can use PowerShell scripts to manage the local cluster. Visual Studio “knows” about the Local Cluster and is set so that when you start the debugger, the application will be built, packaged, and deployed to the Local Cluster.
  • #24: Objective: To briefly introduce the Service Fabric Explorer tool Notes: Service Fabric deployments include the Service Fabric Explorer. This is a web-based tool that helps you see and manage the status of your cluster. You can use it to: See an overview of your cluster health and overall cluster information See and manage your deployed applications & services View and manage the nodes in your cluster
  • #25: Objective: This section will discuss the options for scaling VM’s (VM sizes and storage) and also the concepts of reliability via Availability Sets
  • #26: Objective: Describes the concept related to deploying a Service Fabric application in Azure Notes: In Microsoft Azure, Service Fabric applications are deployed over Virtual Machine (VM) Scale Sets. VM Scale Sets provide infrastructure for scaling workloads across multiple VM’s, as well as mechanisms for cluster management, scaling, and reliability. You can choose the size (and cost) of the VM’s that you application requires, and you can segment different service types to different collections of VM’s, grouped and isolated by subnets within an Azure Virtual Network (VNet), as well as choose to choose to use public-facing or internal-only load-balancing. Management of a Service Fabric Cluster in Azure is split across the Azure tooling - including the Azure Portal, command-line interfaces, and management APIs – as well as through the Service Fabric tooling via its management APIs tools such as the Service Fabric Explorer.
  • #27: Objective: Describes the concept related to Service Fabric Application Upgrades Notes: There are two models for deploying applications to Service Fabric – Full Deployments and Upgrade Deployments. Full Deployments completely tear down an existing application and push up a new instance. Any state held by the Service Fabric partitions will be lost, and users are likely to experience downtime during this kind of deployment Upgrade Deployments use a concept known as Upgrade Domains, in which nodes in the cluster are partitioned into subsets and the upgrade is performed in a series of stages in order to ensure availability. Service Fabric will monitor the health of the system during the upgrade, and if the system health becomes degraded, the upgrade will be rolled back. There are actually 3 upgrade modes – Monitored Mode upgrades perform the upgrade one Upgrade Domain at a time, moving on to the next section only when the previous one has passed all of its health checks. Unmonitored-Auto upgrades merely skip the health checks. Finally, Unmonitored-Manual upgrades require you to upgrade each Upgrade Domain yourself. Note that in order to support rolling upgrades, both versions must be forward and backward compatible (since both versions of the code will co-exist for a time) More information about upgrades: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade