Looking for a good redundancy method

wooja

New member
Feb 10, 2010
271
6
0
stock-bb.com
So, yesterday I had a good 9 hours of downtime on my main website. SQL crashed and it took me a while to realize. Have setup pingdom to let me know in the future.

Anyway, I'm currently using digitalocean with cloudflare and am considering duplicating my VPS for redundancy. I don't mind paying for an extra server as the potential $$ loss of downtime covers it. Was wondering if any of you guys have double server redundancy setups and would be willing to share your configurations.

I did some Googling and searched here on WF but didn't find anything that really fit.
 


I like the idea of a DNS fail over to a static html copy on another host. Amazon route 53 seems like a low bar to entry on this. If you are using WP you have lot of options for making static copies or you can use httrack in any case.

Anyway I don't work on anything big so I am thinking of cheap and easy to maintain solutions.

I find cloudflare more of an annoyance than a benefit these days.

So, yesterday I had a good 9 hours of downtime on my main website. SQL crashed and it took me a while to realize. Have setup pingdom to let me know in the future.

Anyway, I'm currently using digitalocean with cloudflare and am considering duplicating my VPS for redundancy. I don't mind paying for an extra server as the potential $$ loss of downtime covers it. Was wondering if any of you guys have double server redundancy setups and would be willing to share your configurations.

I did some Googling and searched here on WF but didn't find anything that really fit.
 
So, yesterday I had a good 9 hours of downtime on my main website. SQL crashed and it took me a while to realize. Have setup pingdom to let me know in the future.

Anyway, I'm currently using digitalocean with cloudflare and am considering duplicating my VPS for redundancy. I don't mind paying for an extra server as the potential $$ loss of downtime covers it. Was wondering if any of you guys have double server redundancy setups and would be willing to share your configurations.

I did some Googling and searched here on WF but didn't find anything that really fit.

I would focus on sorting out response to an sql crash first. Have you found the cause?
 
I'm still learning but,

Create a 1 or 2 GB swap file. It'll perform better than at other hosts because SSD.
https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04

Install a PHP accelerator like APC. It also works with WP-cache

As for load balancing, I don't have experience with it, but from what I know, to load balance on two servers you'll need an extra servers to manage it, unless you can have one of the main servers manage it somehow.

You can also balance load with two servers by pointing nameservers directly to your two servers. If one of the records/servers is down, the NS lookup will fail and it will go to the other record/server , thus providing redundancy.
https://www.digitalocean.com/commun...d-nameservers-with-digitalocean-cloud-servers
https://www.digitalocean.com/commun...nfiguration-using-virtualmin-webmin-on-ubuntu

And as Juntao said, you can use rsync to sync the two servers.
 
You can also balance load with two servers by pointing nameservers directly to your two servers. If one of the records/servers is down, the NS lookup will fail and it will go to the other record/server , thus providing redundancy.

That isnt really load balancing, thats just sending requests to either server at random. If you're pointing ns1 at ip1 and ns2 at ip2, you do not have any control over which nameserver the client uses, so it would be anything but balanced (evenly).

Also, at no point do you want requests failing?
 
So your down for 9 hours, how long did it take to fix the issue after you noticed it?

Load balancing comes in many flavors, the more control you the more it's going to cost. Typically multiple servers in the same location would go the simple route with round robin dns, limited control since if a server goes down dns will continue sending requests to a dead server. Solve this by using layer 7 routers like F5 and Cisco which are much smarter to not only route traffic to a working but also load balance requests based upon response time. Geo load balancing extends these routers to multiple locations, so let's say your east coast host disappears everything is routed to west coast. Were only talking web servers here, more complexity including a highly available mysql implementation that is in-sync constantly between multiple servers. Most of this comes down to your application architecture and how resilient you need to be with transactions and availability. Internal/External dns all have there failover solutions also.

So in your case with this problem if you just need to restart mysql because you didn't have some basic www and mysql monitoring, plenty of cheap tools to monitor and not build out something you don't really need.
 
how would that work?

Well the first part can be accomplished is various ways. I have used httrack (httrack.com) to make a nice static copy of a WP site on a secondary VPS account (Ramnode 128MB ~$15/yr). With a low memory setup this costs close to nothing (Nginx, ssh, no db, no mail, no php, no nothing = always works). Setup a cron job to periodically refresh the static copy. If you use a minimal Debian 6/7 install the backup server will take minimal maintenance.

The second part, I am a complete idiot about DNS but

For example, suppose your website, example.com, is hosted on 10 servers, two each in five data centers around the world. You can configure Amazon Route 53 to check the health of those servers and to respond to DNS queries for example.com using only the servers that are currently healthy.
Amazon Route 53 Health Checks and DNS Failover - Amazon Route 53

$0.50 per hosted zone / month
$0.500 per million queries – first 1 Billion queries / month
 
So your down for 9 hours, how long did it take to fix the issue after you noticed it?

I was at my inlaws when I noticed it on my phone. The fix was immediate as I just logged into my digitalocean account and did a power cycle on the server. I later went in to the log to see what was wrong and it would seem that there was a " InnoDB: Fatal error: cannot allocate memory for the buffer pool" error.
I'm guessing that the server ran out of memory which is strange since it's a 1GB Ubuntu server with 500mb swap running a Wordpress site with a tiny VBulletin forum.

Load sharing really isn't an issue since I don't even reach 1000 visitors a day so there shouldn't be that much.

The server was running 21 days straight when that happened. I've since taken two steps in the meantime:
1) Ininitialized Pingdom to check every minute and to email me if there's 5 minutes of downtime
2) Will reboot the server one a week to free up any memory leaks.

I'd like the redundancy to be real redundancy so in case of a full-blown server failure I actually have a backup I can use, so the httrack doesn't really help.

I'll look into the Amazin Route 53. I guess all in all I'm going to need to brush up on my server skills if I want this to work properly.
 
I'm guessing that the server ran out of memory which is strange since it's a 1GB Ubuntu server with 500mb swap running a Wordpress site with a tiny VBulletin forum.

Load sharing really isn't an issue since I don't even reach 1000 visitors a day so there shouldn't be that much.

You are spending $10/mo and looking into adding substantial complexity/maintenance and additional expense on something you could host worry free on most decent shared hosts for less. Can I ask why?
 
Instead of redundancy, why don't you put your site on some half decent server instead of pos DigitalOcean?

Like fuck, any idiot 14 year old could have your droplet terminated in a matter of minutes - not to mention the constant "emergency maintenances" you'll run in to with them regardless.

If this is a site that is bringing in some decent income, just slap it somewhere that offers quality performance and uptime and offers management w/ 99.99% SLA.
 
Well... to be honest I'm using DigitalOcean for convenience. I've got like 7 droplets with them for various sites I've got, but my main site is also on it.

I need to have a VPS rather than shared hosting as I have a number of scripts and stuff that the site uses that would most likely not work on shared for a number of reasons.

I was under the impression that DigitalOcean was quite good actually. That said, if you have any managed VPS providers that you could recommend that are "worry free" then I'd be more than happy to pay more to be able to sleep better at night.
 
Well... to be honest I'm using DigitalOcean for convenience. I've got like 7 droplets with them for various sites I've got, but my main site is also on it.

I need to have a VPS rather than shared hosting as I have a number of scripts and stuff that the site uses that would most likely not work on shared for a number of reasons.

I was under the impression that DigitalOcean was quite good actually. That said, if you have any managed VPS providers that you could recommend that are "worry free" then I'd be more than happy to pay more to be able to sleep better at night.

That makes sense. DO's is known for quick deployment, cheap and a good development platform. So yeah, "quite good" but depends on what you are using it for.

If you want worry free then Liquidweb/Storm on demand. More expensive but it will just work forever.
 
Well... to be honest I'm using DigitalOcean for convenience. I've got like 7 droplets with them for various sites I've got, but my main site is also on it.

I need to have a VPS rather than shared hosting as I have a number of scripts and stuff that the site uses that would most likely not work on shared for a number of reasons.

I was under the impression that DigitalOcean was quite good actually. That said, if you have any managed VPS providers that you could recommend that are "worry free" then I'd be more than happy to pay more to be able to sleep better at night.

VPS Hosting Offers - Web Hosting Talk
 
Thanks malloc. Will check them out. First impression shows they only have US servers. I prefer European but might try them nonetheless.

Adevictus....referring me to the VPS section of WHT in no way answers the question of you recommending a worry-free managed VPS provider
What you're basically saying is that anyone and everyone there can be trusted. Thanks but no thanks.
 
Thanks malloc. Will check them out. First impression shows they only have US servers. I prefer European but might try them nonetheless.

Adevictus....referring me to the VPS section of WHT in no way answers the question of you recommending a worry-free managed VPS provider
What you're basically saying is that anyone and everyone there can be trusted. Thanks but no thanks.

Well any reasonable person would want to research their options to see what best fits their needs, WHT VPS forums being one of the best places to do so.

However if you need some spoon feeding then I guess here you go big buy:
VPS Hosting - Cost Effective Managed VPS Hosting Packages From KnownHost