Answer the question
In order to leave comments, you need to log in
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
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.
And here regru? Are you talking about vps or hosting? If hosting, then not how.
you can score a question in a search engine, open the first link and read it!
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 questionAsk a Question
731 491 924 answers to any question