park the future. May 4 – 8, 2015 Chicago, IL
Dec 19, 2015
Spark the future.
May 4 – 8, 2015Chicago, IL
Building Resilient, Scalable Services with Microsoft Azure Service FabricVaclav TurecekSenior Program Manager
Vipul ModiPrincipal Software Engineering Manager
BRK3730
Azure Service Fabric platform
Applications and microservices
Programming models Scaling
Microsoft Azure Service FabricA platform for reliable, hyperscale, microservice-based applications
Azure
WindowsServer Linux
Hosted Clouds
WindowsServer Linux
Service Fabric
Private Clouds
WindowsServer Linux
High Availability
Hyper-Scale
Hybrid Operations
High Density
microservices
Rolling Upgrades Stateful
services
Low LatencyFast startup & shutdown
Container Orchestration & lifecycle management Replication &
Failover
Simple programming models
Load balancing
Self-healingData Partitioning
Automated Rollback
Health Monitoring
Placement Constraints
Battle-hardened for over 5 years
Azure Core Infrastruct
ure
thousands of machines
Power BI
Intune
800k devices
Azure SQL
Database
1.4 million databases
Bing Cortana
500m evals/sec
Azure Documen
t DB
billions transactions/wee
k
Skype for
Business
Hybrid Ops
Event Hubs
20bn events/da
y
App1
App2
Service Fabric cluster with microservices
Stateless servicesA service that has state where the state is persisted to external storage, such as Azure databases or Azure storageExisting web (ASP.NET) and worker role applications
What can you build with Service Fabric?
Stateful servicesReliability of state through replication and local persistenceReduces latencyReduces the complexity and number of components in traditional three tier architecture
Existing apps written with other frameworks
node.js, Java VMs, any EXE
Service Fabric Applications
Azure Private Clouds
Applications composed of microservices
High Availability
Hyper-Scale
Hybrid Operations
High Density
Rolling Upgrades Stateful
services
Low LatencyFast startup & shutdown
Container Orchestration & lifecycle management Replication &
Failover
Simple programming models
Load balancing
Self-healingData Partitioning
Automated Rollback
Health Monitoring
Placement Constraints
Service Fabric
Reliable Actors API Reliable Services API
Build reliable stateless and stateful objects with a virtual Actor Programming Model
Suitable for applications with multiple independent units of state and compute
Automatic state management and turn based concurrency (single threaded execution)
Reliable Actors API
Demo: Reliable Actors API
Learn more about Reliable Actors APIsBreakout Session: BRK3476:
Microsoft Azure Service Fabric Actors: The Director's Cut(Deep Dive into Next Generation PaaS Reliable Actor Programming Model)
Thursday, May 7 2015 @ 5:00 pm Location: S405
Application Package
Unit of • Lifetime• Versioning• Isolation
Counter Service type
Counter WebApp type
Defining applications and services
CounterService
Pkg
Code Config
CounterWebApp
Pkg
Application Type
Instantiating an application
• ServiceType is “like” a class type• ApplicationType is “like” a typed Container • Each service instance has a unique name in the “namespace” of the application
“fabric:/CounterApplication/CounterService”• ApplicationInstance is an instance of the ApplicationType and has an unique name
“fabric:/CounterApplication”
Service Package
B
Service Package
A
app1
Service Package
B
Service Package
A
app4
Service Package
B
Service Package
A
app2
Service Package
B
Service Package
A
app3
Reliable Services API
Build stateless services using existing technologies such as ASP.NET.
Manage concurrency and granularity of state changes with transactions in stateful services.
Communicate with services using the technology of your choice (e.g Web API, WCF, [web]sockets, etc).
Demo: Reliable Services APIStateless word count service
Cloud Services
Azure Tables/NoSQL
Azure Queue
Word count service – Cloud Services
Reliable collections make it easy to build stateful services.
An evolution of .NET collections for the cloud.
Reliable Collections
Collections• Single machine• Single threaded
Concurrent Collections• Single machine• Multi threaded
Reliable Collections• Multi machine• Replicated (HA)• Persistence
(durable)• Asynchronous• Transactional
Data is replicated and durably stored on multiple replicas.Atomically update one or more collections using transactions.Reads are repeatable within the transaction.Enumerations are snapshot based.Supports LINQ.
Reliable Collections
IReliableQueue<T>IReliableDictionary<K,V>
Service FabricStateful Service
Word count service – Service FabricCloud Services
Azure Tables/NoSQL
Azure Queue
Demo: Reliable Services API Stateful word count service
Node 5Node 4Node 3 Node 6Node 2Node 1
Service partitioning
P2
S
S
S
P4
S
P1
SP3SS
S
Services can be partitioned for scale-out.You can choose your own partitioning scheme.Service partitions are striped across machines in the cluster.
Scale-out and partitioning
Load Balancer
Demo: Reliable Services API Scale-out word count service
SummaryBuilt micro-services using Reliable Actors and Reliable Services APIs
Achieved Data Reliability through Reliable Collections and Stateful Actors
Scaled-out using partitioning
Download the Service Fabric developer SDKhttp://aka.ms/ServiceFabric
Download the samples from GitHubhttp://github.com/Azure/ServiceFabric-Samples
Learn from the tutorials and videoshttp://aka.ms/ServiceFabricdocs
Attend other talksBRK3478: Deploying and Managing Services with Microsoft Azure Service Fabric – Wednesday @ 5:00 pmBRK3485: Service Orchestration with Microsoft Azure Service Fabric – Thursday @ 1:30 pmBRK3476: Microsoft Azure Service Fabric Actors: The Director's Cut – Thursday @ 5:00 pm
Provide feedbackhttp://aka.ms/ServiceFabricforumhttp://stackoverflow.com/questions/tagged/azure-service-fabricTwitter hastag #AzureServiceFabric
Call to Action
Visit Myignite at http://myignite.microsoft.com or download and use the Ignite Mobile App with the QR code above.
Please evaluate this sessionYour feedback is important to us!
© 2015 Microsoft Corporation. All rights reserved. © 2015 Microsoft Corporation. All rights reserved.