A
A
Artem Kaybagorov2017-10-17 14:23:26
Domain Name System
Artem Kaybagorov, 2017-10-17 14:23:26

How to make a copy of the site on another hosting?

Help solve the problem.
The site runs in a virtual machine at home, the resources of this VM are abundant for the planned load, but the resources of inexpensive VPS may not be enough for the same fast work. I don’t want to pay expensive for hosting, and it’s impossible to provide full fault tolerance for a home server.
The idea arose to create a copy of the site, place it on a low-cost VPS and make it so that when my home server is unavailable, the traffic is redirected to the hoster's IP.
How to organize it correctly? Maybe you can make several A records for one domain name?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
athacker, 2017-10-17
@ArteMoon

Maybe you can make several A records for one domain name?

Can. Only it at you will be given round-robin'om to clients. That is your home IP, then the address of the host. As a result, half of the customers will go there, half - here.
There are several ways to implement your task. The simplest is to edit A-records in case the home version of the site crashes. That is, if the computer / channel has fallen, then fix the A-record in DNS on the VPS IP.
A more complicated scheme is to start a balancer on a VPS. It will redirect user requests to the home site, and if it fails, to the VPS. The balancer can be made on the same VPS, using nginx, for example. If access to the home server fails, it will start redirecting users to the local copy.

Z
zooks, 2017-10-17
@zooks

Delete this miracle hosting and switch to VPS. You can use your home server to store backups.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question