0

So we Have a server on AWS for our website and we use another provider for our e-mails.

We have a backup policy in place where we have at least 3 places with all the data from our main server one of those is exactly the same webserver running our Webapp inside our company network.

I've been looking for a solution that allowed for this internal server to become a turnkey solution in case something went wrong with our AWS setup

As for right now we have this server setup on another domain and I would need to manually add the A record in case of failure, which in that case would cause some downtime.

From what I've read and researched:

I can't just setup another A record and turn off the backup webserver since it will try to make some clients connect and that will fail.

I don't want to keep this Internal server as a production server since it's not as good a setup as we have in AWS on several aspects.

There are third party services, but they introduce a single point of failure and sincerely I have a much easier time trusting my AWS setup than those.

Is there anyway to configure a dns to only use an A record when all other A records are unresponsive?

4
  • I am not sure to understand your question. Is your webapp purely for internal users or also available externally, since it is on AWS? In the second case and when you switch to your internal server, how will it work for external users, can they access it? Jul 6, 2018 at 15:49
  • @PatrickMevzek it's for external use. As for our local setup, right now no one can access it externally, it's just a backup...... The idea is make it a failover, if (and only if) the production server goes down, it would kick in automatically Jul 6, 2018 at 16:01
  • So you first have a problem to solve on how to access your internal server from outside if you want to use it as a backup. How life or business critical is the application? You have to define how long can the interrupt be (1 minute ? 5 ? 1 hour ? 1 day), before the switchover is made, as the solutions (and the cost) will not be the same for a "near real time" failover or a "1 day is fine" failover. It also depends who handles your DNS currently. Jul 6, 2018 at 16:21
  • Why not just clone the server? Turn off the clone. If the the primary fails, launch the cloned ECS instance. This is the simplest manual method. Improve by using Elastic IP and skip the DNS changes. Next up use the right tools such as Auto Scaling with desired number of servers being 1. If your server fails another is launched and the bad instance is terminated. There are better options. Consider your budget, how much your time is worth and how much downtime affects your business. Jul 12, 2018 at 7:30

1 Answer 1

1

Not natively because A records don't have a priority like MX or SRV records.

So you can:

  • keep the TTL of your A record at 0 seconds and have some monitor software that changes the DNS configuration when the AWS instance fails, or

  • point the A record to some kind of load balancer/gateway that monitors the backend servers and decides whom is sending the traffic to.

In the second method the load balancer becomes the single point of failure, but remember that also in the first method the authoritative DNS server is a single point of failure.

8
  • Some caching resolver will not obey a TTL of 0 and force some minimum value. DNS should/can not be used like that for failover. Jul 6, 2018 at 13:47
  • @PatrickMevzek not only some recursive DNS don't obey the TTL of 0, but also some operative system don't obey it, so yes, it's a bit dangerous. As usual you have to compensate between costs and availability (maybe you can't afford a load balancer or gateway). Jul 6, 2018 at 15:41
  • it is not dangerous per se, just not as effective as one may think it would be Jul 6, 2018 at 15:44
  • In the second case, you can remove the SPOF by having two (or more) servers replying on the same IP in a master-slave configuration (this is very standard). You also have anycasting as a bigger solution. As for the authoritative nameservers being a SPOF while theoretically true, and except if you are hit by a targeted DDOS, there is far more resiliency here (because of all the caches) than on level 4 or more protocols. Jul 6, 2018 at 15:50
  • Unless you have some particular contract with your ISP or you have your own BGP AS, two servers with the same IP have to be on the same network (so let's say in the same city) and that wouldn't be great for HA. Also OP was talking about one instance on premises and one on AWS Jul 6, 2018 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .