Microservices and Azure Service
Fabric
Luis Esteban Valencia –
MVP
www.luisevalencia.com
Twitter: @levalencia
le.valencia@...
TWEET NOW
@levalencia Hablando sobre Service Fabric en
#globalazure #gabcmed
Topics
Introducing Microservices & Azure Service Fabric
Service Fabric Concepts
Developing Service Fabric Applications
Dep...
Introducing Microservices &
Azure Service Fabric
Microservices Architecture
• An evolution of Service Oriented Architecture
• Create a system as a suite of small, independ...
Azure Service Fabric
• Can be thought of as an orchestrator of services across a
managed cluster of machines
• Good for mi...
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 ...
Reliable Services
Stateless Service
• Typically used for Web API front-
ends or background workers that
look at external q...
Azure Cloud Services
(Web & Worker Roles)
Azure Service Fabric
(Services)
• Each role/instance per VM
• Slow deployment & ...
Datacenter (Azure, Amazon, On-Premises, …)
Load
Balancer
PC/VM #1
Service Fabric
Your code, etc.
PC/VM #2
Service Fabric
Y...
Cluster Manager (ports 19080 [REST] & 19000 [TCP])
Performs cluster REST & PowerShell/FabricClient operations
Failover Man...
PC/VM
FabricHost.exe
[Auto-starts at boot]
Fabric.exe
[Inter-node communication]
Your App’s Services
Ex: ASP.NET or other ...
Developing Service Fabric
Applications
Windows Setup
Installation
The Microsoft Azure Service Fabric SDK is included in the “Azure
development” Workload in the Visual Studio 2...
Creating a Project
• Create a new project by selecting the “Service Fabric
Application” template from either the Cloud pro...
Solution Structure
• Application Project
• The Services node lists the service projects that
make up the Application
• Inc...
Service Fabric Local Cluster
• Installed as part of the Service Fabric SDK
• Provides a local debug & test environment
• C...
Service Fabric Explorer
Deployments & Upgrades
Deploying in Azure
• Service Fabric Applications are deployed in Azure into a Virtual
Machine Cluster in a Virtual Machine...
Application Deployments
• Two types of deployments in Service Fabric – Full and Upgrade
• In a Full Deployment, the entire...
Video Demo
#
Preguntas
1. Cuales son los 5 servicios de infraestructura
de Service Fabric.
2. 3 Servicios de Azure que hayan sido
desar...
Próxima SlideShare
Cargando en…5
×

Global Azure Bootcamp: Azure service fabric

150 visualizaciones

Publicado el

Global Azure Bootcamp: Azure service fabric

Publicado en: Software
  • Sé el primero en comentar

Global Azure Bootcamp: Azure service fabric

  1. 1. Microservices and Azure Service Fabric Luis Esteban Valencia – MVP www.luisevalencia.com Twitter: @levalencia le.valencia@outlook.com
  2. 2. TWEET NOW @levalencia Hablando sobre Service Fabric en #globalazure #gabcmed
  3. 3. Topics Introducing Microservices & Azure Service Fabric Service Fabric Concepts Developing Service Fabric Applications Deployments & Upgrades
  4. 4. Introducing Microservices & Azure Service Fabric
  5. 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. 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
  7. 7. Service Fabric Concepts
  8. 8. Service Fabric Concepts Application Service Service Service Node Node Node Node Cluster Partitions
  9. 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. 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. 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. 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. 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. 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
  15. 15. Developing Service Fabric Applications Windows Setup
  16. 16. Installation The Microsoft Azure Service Fabric SDK is included in the “Azure development” Workload in the Visual Studio 2017 installer
  17. 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. 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. 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
  20. 20. Service Fabric Explorer
  21. 21. Deployments & Upgrades
  22. 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. 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.
  24. 24. Video Demo #
  25. 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. #

×