DNS Failover Routing for .NET Windows Service

0

Hi AWS, I have raised the query several times but I haven't received any convincing answer for it so far. This is the follow up request for the question I asked a couple of days back https://repost.aws/questions/QUoRKOK-hFRbeBJxxuZNlJvg/dns-failover-routing.

Currently I am deploying a .NET Windows Service in Active/Passive Mode where the active server is in one region and the passive server is in another region using CI/CD with GitHub Actions. Having said that the deployment happened successfully on both the servers, but I want the service to be running actively on one server at a time i.e. the Primary server and the Standby/DR server will come into play when the Primary server goes down.

To get more insights on deploying a Windows service using DNS failover routing I asked ChatGPT about the same but it said there will be a difference when it comes to deploying a .NET windows service in active/passive failover. My question is knowing the fact that the service doesn't have an endpoint i.e. IP address or Domain then how I am going to create the health check for the same.

So please suggest me a better solution with step-by-step implementation for the same.

profile picture
asked 3 months ago159 views
1 Answer
1

Hey Arjun,

I’d suggest building in a a health check endpoint using something which is part of .NET which is what this is designed for, for your scenario. The load balancer or DNS probes the endpoint and it returns 200 if your .NET service is healthy and something else if it’s not.

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-8.0

profile picture
EXPERT
answered 3 months ago
  • Hi Gary Mclean, first of all thanks for answering. I have few questions though:

    1. Is there any similar capability for .NET Framework 4.7?
    2. Is there a way we can find the endpoint for Windows Service like IP address or Domain Name as I need to add it while creating the Health checks in Route53.
    3. Is it only possible with Containers like Docker as currently our applications are not Dockerize.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions