microservices to scale using azure service fabric

26
Mukul Jain Head of Xpirit India XEBIA

Upload: mukul-jain

Post on 08-Jan-2017

137 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: Microservices to Scale using Azure Service Fabric

MukulJainHeadofXpiritIndiaXEBIA

Page 2: Microservices to Scale using Azure Service Fabric

SomethingInterestingisHappening…..

Page 3: Microservices to Scale using Azure Service Fabric

DigitalDisruptionisBetterandFaster

Page 4: Microservices to Scale using Azure Service Fabric

SpeedUpandScaleUp

Page 5: Microservices to Scale using Azure Service Fabric

TechnologyEvolution

Microservices ==SOADoneRight==Scalability?

Page 6: Microservices to Scale using Azure Service Fabric

App1

Traditionalapproach Microservicesapproach

• Amicroserviceapplicationseparatesfunctionalityintoseparatesmallerservices.

• Amonolithicapplicationhasmostofitsfunctionalitywithinafewprocesses.

• Scalesbycloningtheapponmultipleservers/VMs/Containers

• Scalesbydeployingeachserviceindependentlycreatinginstancesoftheseservicesacrossservers/VMs/containers

App1 App2

Page 7: Microservices to Scale using Azure Service Fabric

• Singlemonolithicdatabase• Tiersofspecifictechnologies

StateinTraditionalapproach StateinMicroservicesapproach• Graphofinterconnectedmicroservices• Statetypicallyscopedtothemicroservice• Varietyoftechnologiesused• RemoteStorageforcolddata

statelessserviceswithseparatestores

statefulservices

statelesspresentationservices

statelessservices

Page 8: Microservices to Scale using Azure Service Fabric

WhatisMicroservice?AutonomousService

Containcodeplusstate

Interactwithothermicroservices overwelldefinedinterfaces

RemainConsistentandAvailableinthepresenceofFailures

• Autonomy• Highcohesion• Lowcoupling

Page 9: Microservices to Scale using Azure Service Fabric

DeveloperDependencies

For a monolith to change, all must agree on each change. Each change has unanticipated effectsrequiring careful testing beforehand.

Developers can create and activate new microservices without prior coordination with others. Their adherence to MSA principles makes continuous delivery of new or modified services possible.

Elements in SOA are developed more autonomously but must be coordinated with others to fit into the overall design.

Page 10: Microservices to Scale using Azure Service Fabric

Microservice

Page 11: Microservices to Scale using Azure Service Fabric

Benefits

AnyLanguageandframework

Resilienceagainstfailure

Selectivescaling

Deploymentofsmallerpieceswithlowerrisk

AlignmentwithOrganization• SmallFocusedTeams

ImprovedResource

Utilizationtoreducecost

FaultIsolation

ServersTreatedascattle,not

pets

Page 12: Microservices to Scale using Azure Service Fabric
Page 13: Microservices to Scale using Azure Service Fabric

ServiceFabricHighAvailability

Hyper-Scale

HybridOperations

HighDensity

Microservices

RollingUpgrades

StatefulServicesLowLatency FastStartup&

Shutdown

CodeOrchestration&LifecycleManagement

Replication&FailoverSimpleprogramming

models ResourceManagement

Self-healingDataPartitioning

AutomatedRollback

HealthMonitoring

PlacementConstraints

Azure Privatecloud Otherclouds

Page 14: Microservices to Scale using Azure Service Fabric

AzureCloudServices(WebandWorkerRoles)

AzureServiceFabric(Stateless,stateful orActorservices)

• 1roleinstanceperVM• Unevenutilization• Slowdeployment&upgrade(boundtoVM)• Slowscalingandfailurerecovery

• ManymicroservicesperVM• EvenUtilization(bydefault,customizable)• Fastdeployment&upgrade• Fastscalingofindependentmicroservices

Page 15: Microservices to Scale using Azure Service Fabric

WindowsOS

WindowsOS WindowsOS

WindowsOS

WindowsOS

WindowsOS

FabricNode

FabricNode

FabricNode

FabricNode

FabricNode

FabricNode

LinuxSupportJavaSupportOnPremisesClusters

Page 16: Microservices to Scale using Azure Service Fabric

App1 App2

AppTypePackages ServiceFabricClusterVMs

HandlingMachineFailures

Page 17: Microservices to Scale using Azure Service Fabric

App1 App2

AppTypePackages ServiceFabricClusterVMs

HandlingMachineFailures

Page 18: Microservices to Scale using Azure Service Fabric

StatefulMicroservices- Replication

Primary

Secondary

Replication

ServiceFabricClusterVMs

Page 19: Microservices to Scale using Azure Service Fabric

WindowsOS

WindowsOS WindowsOS

WindowsOS

WindowsOS

WindowsOS

FabricNode

FabricNode

FabricNode

FabricNode

FabricNode

FabricNode

AppBv2

AppBv2AppBv2

AppAv1

AppAv1AppAv1

AppCv1

AppCv1

AppCv1

AppRepository

AppAv1

AppCv1

AppBv2

AppCv2

AppCv2

AppCv2

AppCv2

Page 20: Microservices to Scale using Azure Service Fabric

Node5Node4Node3 Node6Node2Node1

P2

S

SS

P4SP1

SP3SS

S

• Servicescanbepartitionedforscale-out.• Youcanchooseyourownpartitioningscheme.• Replicasautomaticallyscaleout&inonclusterchanges

Page 21: Microservices to Scale using Azure Service Fabric

Performanceandstressresponse•Richbuilt-inmetricsforActorsandServicesprogrammingmodels•Easytoaddcustomapplicationperformancemetrics

Healthstatusmonitoring•Built-inhealthstatusforclusterandservices•Flexibleandextensiblehealthstoreforcustomapphealthreporting•Allowscontinuousmonitoringforreal-timealertingonproblemsinproduction

Page 22: Microservices to Scale using Azure Service Fabric
Page 23: Microservices to Scale using Azure Service Fabric

ServicesbuiltwithServiceFabric

Page 24: Microservices to Scale using Azure Service Fabric
Page 25: Microservices to Scale using Azure Service Fabric

:SpeedUpandScaleUpTakeaways

Page 26: Microservices to Scale using Azure Service Fabric