I have two Web APIs deployed on IIS runing on two VMs on Azure. Now I want to add an App Service to the cluster (add it as a new node). The three applications are identical (three instances of the same app). What I want to achieve with this is to have a cluster that will be watching if any app goes down and redistribute the responsibility of the dead app to the alive instances and do the opposite when it's alive again. My problem is that I can't connect the App Service to the cluster. I'm using Akk.Net.
I tried a few things:
- I tried to set the App Service as a seed node
- I tried to use Azure Service Discovery Nothing have worked. I don't know if I have to configure something at network level. Thank you in advance :)
Have you checked the official Akka.NET sample here?
Azure Appservice is very particular on how it can connect to other Azure resources and its own "cluster", you will need to set up the Virtual Network resource correctly so that the AppService instances can communicate between themselves. Please read the Explore The Bicep Templates section of the README; it is referring to the .bicep configuration file here.
All of the Akka.NET configurations were done using Akka.Hosting in the Startup.cs file, it configures a sharded Akka.NET cluster that leverages Akka.Management and Akka.Discovery.Azure to provide auto-discovery between all of the AppService instances.