Answer the question
In order to leave comments, you need to log in
Which crash solution to choose based on two VPS?
There is one VPS: 4 vCPU Cores, 30GB RAID10, 1GB RAM + 1.2GB vSwap
and one cloud: 1 CPU, 20GB SSD Disk, 512MB RAM
on both spinning running Ubuntu
I am absolutely far from the practice, and would like to know a few questions at a time:
1 . On which of them is it better to keep dynamics, and on which statics?
2. Is it possible to make one of them (A) the main one, which in turn would:
a) Handle requests.
b) Send the user to the second (B),
c) And if, for example, the executable (B) server went offline, then the server (A) would issue a stub, and all this would happen under one domain.
Logically, I understand that it is better to keep statics in the cloud with an SSD and make it the main one? Will 512 megabytes of memory be enough to process requests and monitor the status of the second server?
Answer the question
In order to leave comments, you need to log in
you can make both servers the same, on one place the database for writing with replication on the second, on the second make it read-only. balancing is performed either by a third server or at the DNS level. If the first one crashes, the second one only works on read-only
Mhm. Balancing based on DNS is very "slow" - some providers have such a hell of a cache on resolvers that you have time to set up the server from scratch 10 times before people get a new record.
From the real one - 2 DNS servers on your virtual machines, which give out A-records pointing to themselves with a meager TTL (like one minute). On a weak server, configure proxy_pass in nginx, hang up the necessary beautiful stub for error 502. Not that a golden bullet, but most people will always go to a live server.
And it is better to place statics both there and there, with a similar configuration, if it fits (on a separate domain, of course).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question