Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reliable Services Jeffrey Richter Microsoft Azure Service Fabric.

Similar presentations


Presentation on theme: "Reliable Services Jeffrey Richter Microsoft Azure Service Fabric."— Presentation transcript:

1 Reliable Services Jeffrey Richter Microsoft Azure Service Fabric

2 Reliable Services (Stateless & Stateful)
.NET Programming model benefits Networking naming service support Self-reporting of instance’s load metrics Integrate with code, config, & data upgrades Efficiency (better density): Multiple services (types & instances) in a single process Other programming models can be built on Service Fabric Example: Reliable Actors

3 Reliable Services Your class object is notified of service start/stop
Similar to Azure Cloud Services’ RoleEntryPoint Your class object does whatever you need it to do Ex: Process network requests or queue messages Stateless services keep their state in an external store Ex: Azure Storage, SQL Database, Document DB, etc. Partition your data so it scales well

4 Creating a Stateless Reliable Service Visual Studio Solution

5 Steps to have your Service Listen
For input endpoint(s), configure load balancer to allow traffic over desired port(s) Add endpoint(s) to ServiceManifest.xml (for ACL’ing) When service starts, listen for network traffic Override CreateServiceInstanceListeners Return method(s) that create listener objects/endpoint names When service instance starts, SF invokes method(s) to create listener object(s) Each listener object starts listening (tcp, http) & returns endpoint to SF SF runtime sends all names/endpoints to SF naming service Endpoints are visible in Service Fabric Explorer

6 Steps to have Client Talk to Service
Client queries naming service Pass service/partition key; returns endpoint Client communicates with endpoint If service moves; communication fails. Re-query naming service. Ways to query naming service ResolvePartition (REST) Resolve-ServiceFabricService (PowerShell) ServicePartitionResolver (.NET) See also ServicePartitionClient which adds retry support

7 Recommended HTTP Endpoint String Format
$"http(s)://{nodeNameorIP}:{port}/" + $"{partitionId}/{instanceId}/{Guid.NewGuid()}/" Example: 99ab0795-c10f e d8f9732/ / dc09a30c-9b7f b7-e b/ For diagnostics Makes every endpoint unique

8 Upgrading a Named Application with Visual Studio

9 Q & A


Download ppt "Reliable Services Jeffrey Richter Microsoft Azure Service Fabric."

Similar presentations


Ads by Google