Cheap 100% Uptime?

Cheap 100% Uptime?

We all know that true 100% uptime is a fortune with dual systems that replicate every other second, Master/Master Data base replication, and so much much more. However things have come a long way, how can we do this on the cheap. Well I have been looking around and thinking, and I think I can setup a basic load balanced site, with as close to 100% uptime as I can; and I think I can do this for under $40/Month. Lets dig into this.

So here is the goal.

1. One Website. ( WordPress )
2. No Email.
3. Backups.
4. Automation?
5. DNS

So your website, it is a WordPress powered site. Ok, no problems, this is pretty easy to setup, you just have to edit the config.php file to setup the normal database settings/information just this time, instead of localhost, you will have a ip / url you point the connection to.

Wait, how to I get my data on both servers? We do this with object storage, and then first mount it as say your /home drive, and you do this on both servers.

Ok now what? Well this isn’t really a technical write-up so we are going to assume some items, or as I write them up here, I will link them in here. So with that on each webserver, you will need two of them, you will have to install a webserver, (Apache) and PHP. You do not need to install MySQL as your going to be using the remote server.

So you now have your two webservers running, both have a object storage mount as /home and you have your site installed in the /home dir, and connected to the remote mysql server.

Um dude, you forgot a few items, like where is this MySQL server coming from, the sky? No silly, from Digital Ocean, and their MySQL cluster! Oh yeah, were going to use Digital Ocean for this setup. Why cause they have all the tools we need, and they are affordable, and I have been using a setup kind of like this for some time.

So we will grab the following from Digital Ocean.

Load Balancer = $12/Month
1 GB Regular Droplet x’s 2 = $12/Month
1 MySQL Clustered DB = $15/Month
250 GB Object Storage = $5/Month

Total $44/Month, well darn, we got close didn’t we. However that is not bad at all.

Few Extra’s / Yearly upfront costs.
Domain Name: $10/Year – NameCheap
Backups: 1 TB $19.95/Year = iDrive.com
DNS – CloudFlare = Free
Email Hosting? – NameCrane.com – 1 GB DirectAdmin Emailhosting $8.95/Year.

So how is this 100% Uptime? Well lets look at a few things, The biggest three being the LB, Clustered MySQL, and the object storage. These services are massive networked clusters already, with massive fail over pools, floating IP’s and more. So really for the $12 + $15 is pretty much a 100% uptime. The failure point will be the Webservers. Now this will more so be overloading them due to the success of your site or poor code/plugins. I currently have several droplets that have broken 1000 days of uptime, so I pretty much have almost 3 years of 100% uptime, all for $12/Month ( I have two ).

There is much more like your firewalls, what OS, what Webserver, what PHP version, and some of those items, but as you can see for $44/Month it can be “done”.

So again, for that price, you can really get truly close to 100% uptime, again this is actually not a bad idea for what I would personally consider “smaller” sites, and by that I mean sites that get less then say 100,000 hits a month. Which is still 3400/hits a day. So that is honestly not bad for a small to medium business in my eyes at least.

Now lets look at a few things like growth. Well there are going to be a few main points of your growth that your going to have to look at, and each has there ease of making happen. So here we go on that!

One, your disk space, so this is a pretty simple thing, login to your Digital Ocean panel and click expand. Yep that is pretty much it. I know that depending on your OS of choice, that you may have to unmount and remount the drive, but that will take 3 seconds.

Two. MySQL, your running out of connections or database size. Same thing, click click, poof. All done.

Three. Traffic, this too is a few clickity clicks.

Four. Your overloading your webservers, well this is fixable by two ways, one expand your droplet to the next level. This is a click click and a reboot, but your in a load balanced setup, so the reboot wont matter. Two, add more webservers to the mix. ** This is a personal though, but grow/expand your droplets first, when you add a droplet, while totally easy, you have to setup yet another webserver which is super easy as you already did it twice and you took notes right? ๐Ÿ™‚

Let me know what else we can add to this, as I will be writing up more detailed how to with this post on my thoughts.