Azure Service Fabric Overview

Embed Size (px)

Text of Azure Service Fabric Overview

W05 Architecting a Large Software Project - Lessons Learned

Azure Service FabricPREVIEW OverviewJoo Pedro Martins26.Mar.2016

1

Joo Pedro jota MartinsSoftware ArchitectMicrosoft Azure Insider + AdvisorCo-founder - GASP + APPUTechEd 2006 Iron Architect WinnerBizTalk Server MVP 2006-2011

2

Ground Rules and ExpectationsThis is based on a non-RTM SDK:there will be problems

This is a different way of architecting software: there will be many disagreements

There is a lot to say: there wont be enough time

The demos are based in software that is in preview. Problems are to be expected.

The programming model underlying this approach is different from what has been the best practice in the age of SOA.

Questions: [Hands raised]Who has used Azure Web and Worker Roles?Who has developed services-driven systems with stateless services?

3

Whats this session about?Microsoft Azure Service Fabric= A platform for reliable, hyperscale, microservice-based applications= PaaS v2 + Stateful Services/Actors= Platform for applications BORN FOR THE CLOUD, not Lift&Shifted

Service Fabric enables you to build and manage scalable and reliable applications composed of microservices running at very high density on a shared pool of machines (commonly referred to as a Service Fabric cluster).

Powers a huge set of Microsoft Services: Azure SQL Database, Azure DocumentDB, Cortana, Power BI, Microsoft Intune, Azure Event Hubs, Skype for Business and others

It provides a sophisticated runtime for building distributed, scalable stateless and stateful microservices.

Also provides comprehensive application management capabilities for provisioning, deploying, monitoring, upgrading/patching, and deleting deployed applications.

Service Fabric is tailored to creating born in the cloud services that can start small, as needed, and grow to massive scale with hundreds or thousands of machines, creating Service Fabric clusters across availability sets in a region or across regions.

4

the platform

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

Microservices

Communication

Management

Reliability

HostingSubsystem

Testability

Federation

Transport

Application Programming Models

Azure WindowsServerLinux

Hosted CloudsWindowsServerLinux

Service Fabric

Private CloudsWindowsServerLinuxHigh AvailabilityHyper-ScaleHybrid OperationsHigh DensityRolling UpgradesStateful servicesLow LatencyFast startup & shutdownContainer Orchestration & lifecycle managementReplication & FailoverSimple programming modelsLoad balancingSelf-healingData PartitioningAutomated RollbackHealth MonitoringPlacement Constraints

Service Fabric enables you to build and manage scalable and reliable applications composed of microservices running at very high density on a shared pool of machines (commonly referred to as a Service Fabric cluster).

Powers a huge set of Microsoft Services: Azure SQL Database, Azure DocumentDB, Cortana, Power BI, Microsoft Intune, Azure Event Hubs, Skype for Business and others

It provides a sophisticated runtime for building distributed, scalable stateless and stateful microservices.

Also provides comprehensive application management capabilities for provisioning, deploying, monitoring, upgrading/patching, and deleting deployed applications.

Service Fabric is tailored to creating born in the cloud services that can start small, as needed, and grow to massive scale with hundreds or thousands of machines, creating Service Fabric clusters across availability sets in a region or across regions.

2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.25-Mar-166

Battle-hardened for over 5 years

Azure Core Infrastructure

thousands of machinesPower BIIntune

800k devicesAzure SQL Database

1.4 million databasesBing Cortana

500m evals/secAzure Document DB

billions transactions/weekSkype for Business

Hybrid Ops

Event Hubs

20bn events/day

and the Halo 4 multiplayer as Project Orleans

2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.25-Mar-167

Service Fabric CapabilitiesApplication deployment services:Rolling update with rollbackStrong versioning Side-by-side supportLeadership electionName service for discovery of applications

High densityPartitioning supportLoad balancing and placement constraintsConsistent state replication frameworkReliable distributed key/value store, collections and queues

Service Fabric MicroservicesA microservice is whatever you want it to be:ASP.NET, node.js, Java VMs, an arbitrary .exeStateless microservicesA microservice that has state where the state is persisted to external storage, such as Azure databases or Azure storageStateful microservicesReliability of state through replication and local persistenceReduces the complexity and number of components in traditional three-tier architecture

Service Fabric vs. Cloud Services

Cloud ServicesService Fabricevolution

2015 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.25-Mar-1610

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

Clusters can scale to1000s of machinesCluster: A federation of machinesNodeNodeNodeNodeNodeNode

Build 2015 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.25-Mar-16 23:43

Cluster: System viewSystem Services Failover manager

Cluster manager

Naming

Image store

Build 2015 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.25-Mar-16 23:43

ReconfigurationTypes of reconfigurationPrimary failoverRemoving a failed secondary Adding recovered replicaBuilding a new secondary

PSSSSSMust be safe in the presence of cascading failures BPXFailedXFailed

Upgrading Services with zero downtimeApplication Package

FD0/UD0FD0/UD1FD1/UD6FD1/UD5FD2/UD4

FD2/UD3

FD Failure Domain; UD Upgrade Domain

Build 2015 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.25-Mar-16 23:43

Basics for devsDownload from WebPI

Sets up local dev cluster with 5 nodes by default

Includes service fabric explorer + powershell cmdlets

Same code that runs on Azure

Stateless service + Automatic Failoverdemo

the programming model

What is a microservice?Is (logic + state) that is independently versioned, deployed, and scaledHas a unique name that can be resolved (e.g. fabric:/myapplication/myservice)Interacts with other microservices over well defined interfaces and protocols like RESTRemains always logically consistent in the presence of failuresHosted inside a container node (code + config)Can be written in any language/framework (node.js, Java VMs, any EXE)Developed by a small engineering team

Build 2015 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.25-Mar-16 23:43

Types of microservicesStateless microserviceHas either no state or it can be retrieved from an external store There can be N instancese.g. web frontends, protocol gateways, Azure Cloud Services etc.

Stateful microserviceMaintain hard, authoritative stateN consistent copies achieved through replication and local persistencee.g. database, documents, workflow, user profile, shopping