How to achieve failover at the DNS level?

The scheme is as follows:
1) In the office of the domain Registrar nastraivaet as DNS servers, cloudflare,
2) In the DNS section cloudflare nastraivaet 2(or more) IP of the load balancers (NGINX) which weights and types of responses (200,500) distribute the load on app servers in case of error don't send the requests to the appropriate upstream server.
What I want to know:
1) how safe is this scheme that you remove added?
2) How to achieve failover at the DNS level(cloudflare) without a paid subscription (a proxy for cloud (cloud) is off)?

Thank you

UPD: if you nastroitj some DNS before/instead of the cloud it will also be a single point of failure. But if 2 DNS server, then how to determine at the client level which of them is responsible? Or the client that will determine: if not available, then go to another NS server, right? If Yes, how was it already at the DNS level to understand whether the APP server/load balancer, as well as on the NGINX level?

Maybe we should throw out the scheme cloudflare?

DNS> cloudflare -> nginx -> apps

Can cost to use AWS services? As far as they will cost more for the "iron balance". That is, there queries schitayutsya or traffic or both?
March 19th 20 at 09:26
1 answer
March 19th 20 at 09:28
In cloudflare like a normal CDN has its own DNS resolver. Why do you need something in front of him?
If it's free then there isn't, but as far as I know it is only available in paid subscription when the proxy cloudflare - alanna81 commented on March 19th 20 at 09:31
@alanna81, what's the problem to pay? Well, or take the AWS route53 - there is no small free limits - elaina_Runolfsdottir commented on March 19th 20 at 09:34
@elaina_Runolfsdottirin a large number of requests - alanna81 commented on March 19th 20 at 09:37
@alanna81, want a service - pay the money. Don't want service - build your architecture in this level, and pay 10 times more - elaina_Runolfsdottir commented on March 19th 20 at 09:40
@elaina_Runolfsdottir, thanks for the reply, though I am not the solution I think I'll find a more reasonable application 15K$ ;) - alanna81 commented on March 19th 20 at 09:43
@alanna81if you have a flow of traffic then you must have enough earnings to cover these costs) - elaina_Runolfsdottir commented on March 19th 20 at 09:46
@elaina_Runolfsdottir, unfortunately(or maybe Vice versa) I am not responsible for earnings, but only for the uptime and the cost of this uptime. Plus "autostazione" in the CF, to put it mildly smallish, but has an API, that's it and probably will use ) - alanna81 commented on March 19th 20 at 09:49
@alanna81, well, if you are told to do for free it is commendable, perhaps, that you try, but the company is obviously somewhat repulsed. I'm talking about 10x said, not just. I thought already. If you need a resiliency of at least 99.9 then you have not enough so to invest - elaina_Runolfsdottir commented on March 19th 20 at 09:52

Find more questions by tags High availabilityDomain name system