Website Exceeding Web Resources. What Was My Action.

Do you know there is limitation on your webhosting account? Even though it says Unlimited Hosting. Let me break it up for you, THERE IS NO SUCH THING AS UNLIMTIED HOSTING!! (There are limit(s) to everything)

My journey for past few days begin with a simple email from my free web-hosting provider who sponsored my hosting (I prefer not to mention any name all this wasn’t their fault). Due to one of my site use CPU and Memory extensively, I was booted from the server (thanks to them they do not ban me instantly), right after I move the site.

Just to brief you, my “abusive” website wasn’t running any database, just a simple php and file website. However, due to heavy crawling by GoogleBots and other webcrawler, the resources usage spike to which normal web-hosting can’t cater.

This website is behind CloudFlare who is doing a great job caching it and protecting it. kudos to CloudFlare. Even though, this website still eating the hosting resources like a hungry boy.

What is This ??? Semua Resources Kena Tapau – This is my early posting on the event. Pity the solution only last for few days.

So.. What was my next move? Diversify. Yes, you read it right. I diversify the website load to few hosting. How I do it?

Apache + Clustering + Load Balancing

This drawing from Oracle Blog is spot on.

So, i purchase myself a new VPS (thank you Servarica) with the following killer spec.

  • 3 core CPU
  • 3GB RAM
  • 3TB Space (I know i know, it’s overkill but I got another project running and demanding a very large space, so do not hate me)
  • Unmetered 100MBps Network

Sick right? But before that I already own a few VPS which was decent but not high enough. The spec was..

  • 1 core CPU
  • 512MB RAM
  • 5GB Space
  • Unmetered 250MBps Network
  • 2 core CPU
  • 2GB RAM
  • 60GB Space
  • Unmetered 200MBps Network

The 1 core CPU VPS, running Apache + clustering + load balancing becoming the super hero facing the internet (hiding behind CloudFlare.. hehehe) routing traffics to 3 server, the new 3 core becoming the primary web server and the 2 core is the side-kick + 1 shared hosting as backup.

My first impression was this setup will overcome whatever demand coming from the the internet, WROOOOOOOOOOOOOOOOOOOOOOG! This setup kills the 2 core VPS many time and I have to manually reboot it due to TKO punch from the internet. Do not under estimate.

On average each node (VPS and shared webhosting) consume 1.5 ~ 2GB RAM and 100% CPU! (except for the 3 core CPU running 50% CPU). I was crapping myself because doing firefighting with endless lost communication with the 2 core. Making me adding more node to the family.

Another wrong move I made was instead adding VPS, I add another shared-webhosting as the new node (cheapskate bugger). Boy what a wrong move. It doesn’t improve anything.

In the end, I purchase another VPS with some processing power and add to the family. The load each node carry was on average below 1GB RAM and 30% CPU usage.

  • 4096MB RAM
  • 4096MB vSwap
  • 4 CPU Cores
  • 75GB RAID10 Diskspace
  • 10TB Bandwidth
  • 100Mbps Port

The conclusion. 1 load balancer – 3 VPS node + 1 shared-hosting node is what keeping me busy for a few days, but it’s a learning curve that I willing to do it over and over again.

the hero (aka the loadbalancer)
the died alot (2 core VPS)
the overkill (3 core VPS)
the equalizer (latest addition 4 core VPS)
the one and only (shared hosting)

Related Post