Features Scalability Availability Latency Lifecycle Data Integrity Portability Manage Services...

Post on 19-Dec-2015

238 views 1 download

Tags:

Transcript of Features Scalability Availability Latency Lifecycle Data Integrity Portability Manage Services...

Spark the future.

May 4 – 8, 2015Chicago, IL

Microsoft Azure Service Fabric ArchitectureGopal KakivayaCorporate Vice PresidentMicrosoft Corporation

BRK3717

Agenda

• Application development • Azure Service Fabric• Microservices• Reliability & scale-out• Lifecycle management• Summary

Application development in the age of the Cloud

FeaturesScalability

AvailabilityLatency

Lifecycle

Data IntegrityPortability

Manage ServicesDeliver Features FasterCreate Business Value

Cloud Service Architectures

traditional

User Interface

Business Logic

Data

User Interface

Business Logic

DataMicroservices

FeaturesScalability

Manage ServicesDeliver Features FasterCreate Business Value

AvailabilityLatency

Lifecycle

Data IntegrityPortability

Microsoft Azure Service FabricA platform for reliable, hyperscale, microservice-based applications

Microservices

Application Programming Models

Azure

WindowsServer Linux

Hosted Clouds

WindowsServer Linux

Service Fabric

Private Clouds

WindowsServer Linux

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

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

Microsoft Azure Service FabricA platform for reliable, hyperscale, microservice-based applications

Microservices

Communication

Management Reliability HostingSubsystem

Testability

Federation

Transport

Application Programming Models

Azure

WindowsServer Linux

Hosted Clouds

WindowsServer Linux

Service Fabric

Private Clouds

WindowsServer Linux

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

Is (logic + state) that is independently versioned, deployed, and scaled

Has a unique name that can be resolved e.g. fabric:/myapplication/myservice

Interacts with other microservices over well defined interfaces and protocols like REST

Remains always logically consistent in the presence of failures

Hosted inside a “container” (code + config) Can be written in any language and framework

node.js, Java VMs, any EXE

Developed by a small engineering team

What is a microservice?

Stateless microservice Has either no state or it can be retrieved from an external store There can be N instances e.g. web frontends, protocol gateways, Azure Cloud Services etc.

Stateful microservice Maintain hard, authoritative state N consistent copies achieved through replication and local persistence e.g. database, documents, workflow, user profile, shopping cart etc.

Types of microservices

Stateless microservice

Demo

Federation and transport subsystems

Communication

subsystem

Reliabilitysubsystem

Activationsubsystem

TestabilitysubsystemFederation

Transport

Application Programming Models

Microservices

Managementsubsystem

A set of independent machines; physical or virtual

Typical datacenter

A set of machines that Service Fabric stitches together to form a cluster

Clusters can scale to 1000s of machines

Cluster: A federation of machines

Node

Node

Node

Node

Node

Node

Machine failure detection

Time = t1

83 76 50 4664 New Node arrived61

Time = t2

8361

50 46Failures Detected

cluster reconfigured

83 76 6450 46

Time = t0

Nodes failed

Cluster: System view

System Services Failover manager

Cluster manager

Naming

Image store

Service Fabric Explorer

Demo

Reliability and hosting subsystems

Communication

subsystem

Managementsubsystem

Reliabilitysubsystem

Hostingsubsystem

TestabilitysubsystemFederation

Transport

Application Programming Models

Microservices

Queues Storage

3-Tier service pattern

Front End(StatelessWeb)

StatelessMiddle-tierCompute

Cache

Scale with partitioned storage

Increase reliability with queues

Reduce read latency with caches

Manage your own transactions for state consistency

Many moving parts each managed differently

Load Balancer

StatefulMiddle-tierCompute

Stateful services: Simplify design, reduce latency

Front End(StatelessWeb)

data stores used for analytics and disaster recovery

Application state lives in the compute tier

Low Latency reads and writes

Partitions are first class for scale-out

Built in transactions

Fewer moving parts

Load Balancer

Stateful microserviceDemo

Each service is backed by replica set to make its internal state reliable

All replicas are logically consistent – meaning all replicas see the same linearized order of read and write operations to initial state

Read-Write quorums are supported and are dynamically adjusted

Replica set is dynamically reconfigured to account for replica arrivals and departures

Stateful microservices are reliable and consistent

Stateful microservice

Application Package

PSSreplication

replication

PSS

Reads are completed at the primary

Writes are replicated to the write quorum of secondaries

Replication

P

S

S

S

S

WriteWriteWrite

Write

AckAck AckAck

ReadValue WriteAck

Types of reconfiguration Primary failover Removing a failed secondary Adding recovered replica Building a new secondary

Replica States None Idle Secondary Active Secondary Primary

Reconfiguration

P

S

S

S

S

S

Must be safe in the presence of cascading failures

B PXFailed

XFailed

Microservices placement and failover

Node 103

P

SS

Node 104

SS

Node 102

P

SS

S

Node 105

PSSS

Node 101

SS

P

Node 100

S

PS

S

P

SS

S

Cluster MonitorDemo

Application Lifecycle Management

Communication

subsystem

Managementsubsystem

Reliabilitysubsystem

Hostingsubsystem

TestabilitysubsystemFederation

Transport

Application Programming Models

Microservices

Application: logical grouping of microservices

Application Contain

erContain

er

Container

Container

Provisioning and deployment of constituent microservices

Upgrade microservices without loss of availability Monitor microservices Interface with machine management layer for

autoscale and initiating reboot, reimage, and repair actions

Provide operational insight into aggregate utilization – inventory, performance counters/metrics, etc. – for capacity planning

Application Lifecycle Management

No Downtime Upgrade

Demo

Upgrading Services with zero downtimeApplication Package

FD0/UD0

FD0/UD1

FD1/UD6

FD1/UD5

FD2/UD4

FD2/UD3

Testability subsystem

Communication

subsystem

Managementsubsystem

Reliabilitysubsystem

Hostingsubsystem

TestabilitysubsystemFederation

Transport

Application Programming Models

Microservices

Automatic Orchestration

Hybrid Operation

Self-healing

Self-sufficient

Comprehensive

The same technologyMicrosoft uses

Proven more than 5 years

Investment and roadmap

Stateless or Stateful

Visual Studio tools

Focus on features not

Infrastructure

Rolling upgrades

Azure Service Fabric

Rapidly develop

microservice based

applications

Operate reliable, scalable services

Enjoy the confidence of a battle-

tested platform

Download the Service Fabric developer SDK http://aka.ms/ServiceFabric

Learn from the tutorials and videos http://aka.ms/ServiceFabricdocs

Attend other talks BRK3730: Building Resilient, Scalable Services with Microsoft Azure Service Fabric – Tuesday @

1:30 pm BRK3478: Deploying and Managing Services with Microsoft Azure Service Fabric – Wednesday

@ 5:00 pm BRK3485: Service Orchestration with Microsoft Azure Service Fabric – Thursday @ 1:30 pm BRK3476: Microsoft Azure Service Fabric Actors: The Director's Cut – Thursday @ 5:00 pm

Provide feedback http://aka.ms/ServiceFabricforum http://stackoverflow.com/questions/tagged/azure-service-fabric Twitter hashtag #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.