Download - Service Fabric Overview (Yves Goeleven)
From Applications to MicroServices
What a difference 10 years makes
Deploy
10 years agoContinuous Integration Always-on, hyper-scale servicesService FabricContinuous Deployment
Yves GoelevenSolution Architect
• MessageHandler.net
• Particular Software (NServiceBus)
• Windows Azure MVP
Automates Microservice Lifecycle Management
What is Service Fabric?
Service Fabric
It automates following aspects of the lifecycle:
• Zero-downtime deployment• Rolling upgrade & side by side versioning• Health monitoring & diagnostics• Auto-scaling & resource balancing• Data partitioning & replication• Host integration (Windows Update
coordination)• Test In Production (Chaos service)• Cross-datacenter clustering (optional)
It’s not new! It’s production proven technology.
What is Service Fabric?
Designed to host azure’s services:
• Azure Database• Azure DocumentDB• Power BI• Azure Compute & Network provisioning
(ARM)• Event Hub• Service Bus (ARM & Azure Pack)• Azure Data Factory• Intune• Cortana• Bing Weather• Skype for Business• Microsoft Online Directory Services
Microsoft Azure
Node Node Node Node Node
Nodes, Application Types & Service Types
What is a Service ?
Service represents:• executable unit of code• it’s configuration • and data
Application
Service Service Service
Code Config Data Code Config Data Code Config Data
in any shape or form, including:
• Any x64 exe• Container (Docker and friends)• Dnx ( aspnet 5 )• Actor models (Orleans, SF, Akka.net)
• Grouped into Application Types• Managed by nodes
Developer Machine
An abstraction over virtual machines
Nodes
Azure Cluster Production DataCenterProduction: 1 Node == 1 VM
Azure, own datacenter, windows, linux, amazon, …
Multiple hosting options
AZURE VMWARE HYPER-V
Availability Replica Management Health ALM
Load Balancing Diagnostics Partitioning Placement
Runtime API Layers
Programming models
Actor Framework API
Service Framework API
Collection/KVS API
State Management API
Replication Set Management API
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
Provided By Windows Fabric
Provided By User Application
Replica setManagement
StateReplication
StateStorage
Messaging ProgrammingModel
BusinessLogic
Games, IoT scenarios
Traditional Enterprise Applications
Custom communication
Replicated Data Structure Providers
Replicator Providers
High Level Comparison
Choosing between Actors & Services
Reliable Actors API Reliable Services API
Simplicity Flexibility
Small independent units of state & logic Logic across multiple components
Single threaded objects Use reliable collections to store & manage state
Framework manages concurrency & state You manage concurrency & state
Platform manages communication You want to manage communication
Partitioning scheme managed for you You can manage the partitioning scheme
Statefull Stateless
Actor Model
Client
Reliable State Manager
Transactional Replicator
Local Persistent Log
Shared Log Dedicated Log
To secondaries
Proxy
Ac1
Ac2
Ac3
Ac4
Ac5
Proxy
Proxy
Proxy
Proxy
Proxy
ClientProxy
Ac1
Ac2
Ac3
Ac4
Ac5
Proxy
Proxy
Proxy
Proxy
Proxy
Reliable Dictionary State
Provider
Actor ActivationState
State
State
State
State
Communication Listener
Actor Activation
Communication Listener
Concurrency
Actor Model
TimeActorId1Method1
ActorId1Method2
ActorId1Timer
ActorId2Method1
ActorId2Method2
ActorId2Reminder
Request arrived, lock acquired without waitEntered method1
Created task
Exited method1
Task completed
Lock released
Lock acquired
Entered method2
Created task
Exited method2
Task completed
Lock released
Request arrived, waiting for lock asynchronously
Request arrived, waiting for lock asynchronously
Lock acquired
Entered callback
Created task
Exited callback
Task completed
Lock released
Lock acquired
Entered callback
Created task
Exited callback
Task completed
Lock released
Lock acquired
Entered method1
Created task
Exited method1
Task completed
Lock released
Request arrived, lock acquired without waitEntered method2
Created task
Exited method2
Task completed
Lock released
Request arrived, waiting for lock asynchronously
Request arrived, waiting for lock asynchronously
Statefull Stateless
Service Model
Client
Communication Listener
Service Impl
StatefullService
StatefullServiceBase
Client
Communication Listener
Service Impl
StatelessService
StatelessServiceBase
Other Communication
Channels
Client
Other Communication
Channels
Client
Reliable State Manager
Transactional Replicator
Local Persistent Log
Shared Log Dedicated Log
To secondaries
Proxy Proxy
Single machine Cluster
Mind the load balancer
Machine
ClientHttp
Http.sys
Node
Node
Node
Node
Node
Service ClientHttp
Node
Node
Node
Node
Node
Http.sys
Http.sys
Http.sys
Http.sys
Http.sys
NLB
Service
Service
Service
Service
Service
*Probing may skew the results a bit