S
S
SKEPTIC2019-06-27 12:27:51
Domain Name System
SKEPTIC, 2019-06-27 12:27:51

How to make a domain served by 2 servers?

How to make a site served by 2 or more nginx servers?
That is, one domain and several servers for balancing?
How can this be done on a regra?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
akelsey, 2019-06-27
@pro100chel

You can use DNS (or round-robin) as already suggested - it will just be load balancing between two servers. But no fault tolerance - if one server goes down - half of the clients will receive a 502 error. (make two A records for the same name www.mysite.ru - from this moment you can start pinging www.mysite.ru - each time there will be a new IP)
You can use a balancer (the same nginx), but the balancer will also be a single point of failure. And for it, you also need to make high availability, install a second balancer (second nginx and make a cluster).
The third option, to make a cluster on two existing nodes, apparently will not suit you, otherwise why do you want to balance - to distribute the load. And this will not be in this configuration.
Those. it turns out the most correct option:
raise two additional nodes on nginx, put them in the cluster, register the IP address of the cluster share in DNS. It goes without saying to set up these two new nginx to balance traffic to your current nginx.
It is very difficult to advise something else without additional details.

P
Peter, 2019-06-27
@petermzg

Multiple IPs in DNS (A-record)

A
Anatoly, 2019-06-27
@Tolly

And here regru? Are you talking about vps or hosting? If hosting, then not how.

D
Dim Boy, 2019-06-27
@twix007

you can score a question in a search engine, open the first link and read it!

L
Linuxoid70, 2019-07-04
@Linuxoid70

round-robin DNS + a site on a geo-cluster (for example, the guys from kolpak.no do this), maybe someone else in the Russian Federation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question