Search code examples
azure-service-fabric

Service Fabric App removed after restarting vmss


we have multiple staging environments for our service fabric. The development environment (VMSS) is being deallocated automatically every night in order to save some costs. Our problem is that all applications that were deployed are removed from the cluster.

Any suggestion? are we missing any configuration?

Thanks


Solution

  • Service Fabric stores state on local, ephemeral disks, meaning that if the virtual machine is moved to a different host, the data does not move with it. In normal operation, that is not a problem as the new node is brought up to date by other nodes. However, if you stop all nodes and restart them later, there is a significant possibility that most of the nodes start on new hosts and make the system unable to recover.

    Also, if you deallocate a VM, the temp disk is released.

    • So, always leave at least 3 nodes running for a (Bronze reliability tier) development cluster.

    • Or delete and recreate the cluster, combined with automated application deployment.

    • You can scale node SKU's down for the night too.

    More info here.