E
E
exhang2019-02-10 18:43:42
Domain Name System
exhang, 2019-02-10 18:43:42

What is the best way to implement a failover service?

There is a small but important service that works via https (webhook, api), software in which I can’t make changes communicates with it, you need to get 99.9% uptime, now everything works on one server, it crashes periodically.
Now replication (clustering) of the service is ready, i.e. the same service is available from 3 different servers that completely duplicate each other.
Now I’m thinking about what to do with the domain, I see 2 options:
1) monitor the domain and the availability of the service through zabbix with an interval of 30-60 seconds, register TTL in DNS for 30-60 seconds and in case of a fall, interrupt the IP in A records with a script, according to the idea service must be quickly accessible from a spare vehicle. But the question arises, what if the cache? And if you put such a small TTL in DNS, probably nothing good will happen?
2) register 2-3 IPs in A DNS records and get round-robin, it should give out one of the 3 IPs that is currently working.
The implementation of the http balancer is not an option a la hproxy or based on nginx because it is this balancer that turns out to be the weakest point in the entire system, because again everything depends on 1 server.
That's the question, how best to implement this, maybe there are other options for implementing fault tolerance?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-02-10
@inoise

Isn't it easier to throw into the cloud? Yes, obviously more expensive than now, but with one server, this is almost unattainable uptime. You need at least two for the service, balancer and all that

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question