27
park the future. May 4 – 8, 2015 Chicago, IL

Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Embed Size (px)

Citation preview

Page 1: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Spark the future.

May 4 – 8, 2015Chicago, IL

Page 2: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Building Resilient, Scalable Services with Microsoft Azure Service FabricVaclav TurecekSenior Program Manager

Vipul ModiPrincipal Software Engineering Manager

BRK3730

Page 3: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Azure Service Fabric platform

Applications and microservices

Programming models Scaling

Page 4: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 5: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 6: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

App1

App2

Service Fabric cluster with microservices

Page 7: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 8: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 9: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 10: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Demo: Reliable Actors API

Page 11: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 12: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 13: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 14: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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).

Page 15: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Demo: Reliable Services APIStateless word count service

Page 16: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Cloud Services

Azure Tables/NoSQL

Azure Queue

Word count service – Cloud Services

Page 17: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 18: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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>

Page 19: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Service FabricStateful Service

Word count service – Service FabricCloud Services

Azure Tables/NoSQL

Azure Queue

Page 20: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Demo: Reliable Services API Stateful word count service

Page 21: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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.

Page 22: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Scale-out and partitioning

Load Balancer

Page 23: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

Demo: Reliable Services API Scale-out word count service

Page 24: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

SummaryBuilt micro-services using Reliable Actors and Reliable Services APIs

Achieved Data Reliability through Reliable Collections and Stateful Actors

Scaled-out using partitioning

Page 25: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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

Page 26: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

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!

Page 27: Building Resilient, Scalable Services with Microsoft Azure Service Fabric Vaclav Turecek Senior Program Manager Vipul Modi Principal Software Engineering

© 2015 Microsoft Corporation. All rights reserved. © 2015 Microsoft Corporation. All rights reserved.