What will happen if a guest executable on Service Fabric node dies?

212 Views Asked by At

I'm planning to host my guest executable in Service Fabric cluster but have this doubt that what will happen if my guest executable on Service Fabric node dies?

Will Service Fabric automatically restarts my executable again

2

There are 2 best solutions below

0
On BEST ANSWER

Yes it will be restarted when it crashes. Service Fabric detects when a process crashes. It will restart the process that crashed. It will be restarted on a different (healthy) cluster node.

It doesn't matter if you're running a Stateful / Stateless service or a guest executable in this situation. The behavior is the same.

More info here

0
On

Now things changed: there's a RunToCompletion ExecutionPolicy, like

<ServiceManifestImport>
  <ServiceManifestRef ServiceManifestName="RunToCompletionServicePackage" ServiceManifestVersion="1.0"/>
  <Policies>
    <ExecutionPolicy Type="RunToCompletion" Restart="OnFailure"/>
  </Policies>
</ServiceManifestImport>

The document says:

Starting with version 7.1, Service Fabric supports RunToCompletion semantics for containers and guest executable applications. These semantics enable applications and services that complete a task and exit, in contrast to always running applications and services.