#1 2016-09-29 17:32:37

promo25
Trusted Member
Registered: 2015-05-04
Posts: 8

Is it posible to host same Wordpress in 2 different VPS for redundancy

I have a wordpress site which is hitting the limits of a shared hosting and I have a few unused vps with 2Gb ram and a lot more processing power, bandwith and up/down speeds than the shared hosting.

I'd like to host it on a vps but I'm worried about the uptime because those VPS go offline more often than I'd like.

So is it possible to host the same site in two VPS and redirect users to VPS B when VPS A is down? Or even better, load balancing but I think it's not really possible with wordpress. The vps are in different datacenters so when one goes down for maintenance the other is up.

Thanks and sorry if it's not the right place to ask, I couldn't find a lot of info about this.

Last edited by promo25 (2016-09-29 17:38:12)

Offline

#2 2016-09-29 20:09:58

AnthonySmith
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 3,944
Website

Re: Is it posible to host same Wordpress in 2 different VPS for redundancy

Yes you can do that, on LES for example you need to create a master<>master database connection between 2 VPS, put your haproxy (or equivalent) entries in and then point your A records.

Its the DNS side that's the key, you need a DNS service that will auto fail a record when its unreachable.

This is one of those questions where if I was sitting in front of you with a piece of paper it would be much easier to explain and I could get very complex, you could have 2 LES servers in 2 locations running only mysql, link them as master<>master, 2 more in the same locations as the httpd connecting back to the mysqld server(s), then you can take a few more to act as load balancers and so on and so on.

Or you could just use cloudflare add 2 A records with the same low TTL so you get pseudo round robin and have 2 LES servers in 2 other unique locations monitoring uptime and if one goes down trigger and API call to delete the A record of the one that is down and re-add it when it is up again.

so yeah, it is very possible, you dont need stable VPS servers to build it (kind of why LES exists to begin with), if your really interested I will draw something and give some examples.


https://upto32.com retro gaming and nostalgia forum that does not take itself to seriously smile

Offline

#3 2016-09-30 15:29:18

promo25
Trusted Member
Registered: 2015-05-04
Posts: 8

Re: Is it posible to host same Wordpress in 2 different VPS for redundancy

Backtogeek wrote:

Yes you can do that, on LES for example you need to create a master<>master database connection between 2 VPS, put your haproxy (or equivalent) entries in and then point your A records.

Its the DNS side that's the key, you need a DNS service that will auto fail a record when its unreachable.

This is one of those questions where if I was sitting in front of you with a piece of paper it would be much easier to explain and I could get very complex, you could have 2 LES servers in 2 locations running only mysql, link them as master<>master, 2 more in the same locations as the httpd connecting back to the mysqld server(s), then you can take a few more to act as load balancers and so on and so on.

Or you could just use cloudflare add 2 A records with the same low TTL so you get pseudo round robin and have 2 LES servers in 2 other unique locations monitoring uptime and if one goes down trigger and API call to delete the A record of the one that is down and re-add it when it is up again.

so yeah, it is very possible, you dont need stable VPS servers to build it (kind of why LES exists to begin with), if your really interested I will draw something and give some examples.

That would be great! Thank you.

Offline

#4 2016-10-12 05:34:21

mred
Trusted Member
Registered: 2015-10-02
Posts: 10

Re: Is it posible to host same Wordpress in 2 different VPS for redundancy

Well, if I really understood what you want, everything is perfectly described here: https://www.digitalocean.com/community/ … untu-14-04
I'm not sure about only one thing - will GlusterFS work on LES?

Offline

Board footer

Powered by FluxBB