Features Scalability Manage Services Deliver Features Faster Create Business Value Availability...

Preview:

Citation preview

Gopal KakivayaCorporate Vice President

Microsoft Azure Service Fabric Architecture

2-640

Agenda

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

Application development in the age of the Cloud

FeaturesScalability

Manage ServicesDeliver Features FasterCreate Business Value

AvailabilityLatencyLifecycleData IntegrityPortability

Cloud Service Architectures

traditional

User Interface

Business Logic

Data

User Interface

Business Logic

DataMicroservices

FeaturesScalability

Manage ServicesDeliver Features FasterCreate Business Value

AvailabilityLatencyLifecycleData 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 Latency Fast startup & shutdown

Container Orchestration & lifecycle management Replication &

FailoverSimple

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 Hubs20bn

events/day

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 Latency Fast startup & shutdown

Container Orchestration & lifecycle management Replication &

FailoverSimple

programming models

Load balancing

Self-healingData Partitioning

Automated Rollback

Health Monitoring

Placement Constraints

What is a microservice?• 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

Types of microservices• 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.

Stateless microserviceDemo

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 to1000s 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 viewSystem Services Failover manager

Cluster manager

Naming

Image store

Service Fabric ExplorerDemo

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 microserviceApplication Package

PSSreplication

replication

PSS

Replication• Reads are completed

at the primary• Writes are replicated to

the write quorum of secondaries P

S

S

S

SWriteWrite

WriteWrite

AckAck AckAck

ReadValue WriteAck

Reconfiguration• Types of reconfiguration

• Primary failover• Removing a failed

secondary • Adding recovered

replica• Building a new

secondary

• Replica States• None• Idle Secondary • Active Secondary• Primary

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 UpgradeDemo

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 technology Microsoft uses

Proven more than 5 years

Investment & Roadmap

Stateless or Stateful

Visual Studio tools

Focus on features not infrastructure

Rolling upgrades

Azure Service FabricRapidly 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• Building Resilient, Scalable Services with Microsoft Azure

Service Fabric• Deploying and Managing Services with Microsoft Azure

Service Fabric• Provide feedback• http://aka.ms/ServiceFabricforum• http://

stackoverflow.com/questions/tagged/azure-service-fabric

Call to Action

Improve your skills by enrolling in our free cloud development courses at the Microsoft Virtual Academy.Try Microsoft Azure for free and deploy your first cloud solution in under 5 minutes!Easily build web and mobile apps for any platform with AzureAppService for free.

Resources

© 2015 Microsoft Corporation. All rights reserved.

Recommended