Reputation: 41
We use Azure Service Fabric with Reliable Services and Actors, the IoTHub and Web Apis and are currently integrating "Transient Fault Handling" (TFH) to deal with errors during (remote) communication of services.
For Azure Storage and SQL it is already implemented, we use the built-in retry policies for that and it works fine.
But what about the Service Fabric internal communication? There are also services, communicating via a remoting mechanism.
Here are my questions:
Additional information I already gathered:
This article about communication between services describes a typical fault-handling retry pattern for the inter-service communication. But instead of ICommunicationClientFactory and ICommunicationClient, we use Service Remoting for that. I could not figure out, how to use this typical fault handling with Service Remoting.
Upvotes: 2
Views: 1381
Reputation: 269
Late answer, but maybe people are still looking for answers... Anyhow, Service Fabric has default transient fault handling (and non transient fault handling as well). Via the OperationRetrySettings you can customize these. You can also customize other properties via the TransportSettings. Here is an example how you can customize these settings:
FabricTransportSettings transportSettings = new FabricTransportSettings
{
OperationTimeout = TimeSpan.FromSeconds(30)
};
var retrySettings = new OperationRetrySettings(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(1), 5);
var clientFactory = new Microsoft.ServiceFabric.Services.Remoting.FabricTransport.Client.FabricTransportServiceRemotingClientFactory(transportSettings);
var serviceProxyFactory = new Microsoft.ServiceFabric.Services.Remoting.Client.ServiceProxyFactory((c) => clientFactory, retrySettings);
var client = serviceProxyFactory.CreateServiceProxy<IXyzService>(new Uri("fabric:/Xyz/Service"));
return client;
hth //Peter
Upvotes: 5