New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Setting up 2 VPS that both of them uses 1 domain
i have a contabo vps lets name it vps1
i would like to rent another vps from a different provider, let's say vps2 is from linode
i have some domains running on vps1
i want to real time sync all website files and mysql databases from vps1 to vps2
so, if vps1 went down or something, the domain will redirect to vps2 files.
is this even possible?
i am sorry for my f*ked up english
Comments
yes.
can you provide more details please? or some keywords about my situation so I can use google?
Good keywords are: failover dns, failover website, host one website on two servers 😂
also rsync, load balancing, will work for future. He think like my older me.
thank you, but what's funny I am trying to learn new things 😂
is that a good or a bad thing 😂
Depend on your future though.
Database: SQL replication
System file: DRBD or lsyncd
Domain: DNS failover
It certainly is. There are many ways, and which one(s) are best will depend on a few things:
Sometimes the simplest solution is the best to start with. That is easier to test and monitor. Make sure you do properly test and monitor your solution though: at the point the primary dies is exactly the wrong time to be discovering that your backups and the secondary hasn't updated in weeks…
As a for instance: my personal mail server (currently an instance of Zimbra but that'll be being replaced soon) does a proper full backup twice daily (before i'm due to wake up usually, and ), this is automatically restored to the backup VM and I can login to see it is no more than a day out of date. It also does a live backup (which might be a little inconsistent despite using LVM snapshots as it doesn't stop the server while doing it) far more often, should I need to restore something from the last few hours if the primary ever dies. The main job of the second VM is to test the backups, but with a couple of DNS changes it could take over the whole job if the DC the main server is in burns down. My RPO is “twelve hours for everything, a lot shorted maybe for some things but I don't mind manual work to restore them”.
In contrast: in DayJob we have databases and related applications hot geo-replicated, if the primary goes down for any length of time we can switch over quickly and lose very little if anything. But that is more faf to configure, reliably monitor, and regularly retest, and costs in bandwidth and such. Our RTO and RPOs there are very short, though not short enough that we need to worry about restoration of service being near instantaneous.
Shit. Oi, Me: repeat after me:
We must stop typing walls of text into random forums, instead of spending time on our own projects.
We must stop typing walls of text into random forums, instead of spending time on our own projects.
We must stop typing walls of text into random forums, instead of spending time on our own projects.
… … … … …
No idea why some of you gave him shit for trying to learn new things. Like you were born with this knowledge already.
Thought this forum had a rule about being a dickhead.
Hi,
There is a really good tutorial on LEB about this:
https://lowendbox.com/blog/how-to-setup-a-highly-available-wordpress-site-from-scratch-part-1/
Keith
thank you so much, ill check this out
it's okay 😂
wow, this is too much information 😂
thank you man!
you are the best!
simple and direct answer 😁
Check Amazon Route 53 too which can help with DNS failover + monitoring.
could you tell us more about dns failover sir? what software needed to make dns failover?
Be one or you'll not fit in?
No argument there, I can be a dick quite often but never when someone asks for help.
Appreciate OP for asking just keywords that can be searched online instead of expecting to be spoon fed.
i think it's easy with Cloudflare, check this blog
https://blog.cloudflare.com/introducing-load-balancing-intelligent-failover-with-cloudflare/
Who gave him shit? I see no such posts above yours. He got help from several people. Next time, reply quote so people know what you're talking about. I have no idea unless posts were deleted.
My setup consist of ping test using monit and cloudflare script I modify a bit from @mwt script. It works pretty neat, below is when the failover take place (
/opt/cf_switch/cf.sh
takes care of dns change to cloudflare api).Completely free, all you have to do is sign up for free cf account.