Posts Tagged ‘Dreamhost’

Dreamhost VPS Traffic Benchmark

September 6th, 2013 1 comment

I decided to go with the Dreamhost‘s VPS server after being on shared for 6 years. I moved all of my domains to 300MB VPS which was crashing every 20-30 minutes, then I decided to give it a shot and upgrade to a 400MB VPS, that easily reduced the reboots and after that I had reboots just every 3-4 hours.

I had some troubles at the beginning because my websites were generating quite of traffic and I decided to do some calculations of what traffic load can the Dreamhost VPS handle. Here are the results:

VPS Setup:
RAM: 400MB
Total running domains: 12

1 month load/traffic results on the VPS:

Total Hits: 965922/mo
Total Unique Visitors (IPs): 34079/mo
Total Bandwidth Used: 56.3GB/mo
Server IOPS Used – Avg: 9403; Max: 18421; Min: 1157;

Fair enough! The following numbers are what can a Dreamhost VPS handle per 100MB of VPS RAM resource:

Total Hits (Approx): 250000 hits/mo
Total Unique Visitors (IPs): 8519/mo
Total Bandwidth: 14.07GB/mo

NOTE: This is the traffic that was utilizing the maximum of my VPS, no  resources were left unused! Sometimes the server was rebooting on spikes by itself in order to keep the host safe and stable.
At some point I had to disable all cron jobs on the VPS because it was barely handling the load and it was rebooting constantly. After awhile I decided to shut down some of my domains and sub-domains that
didn’t bring any money, but doing great traffic and I was able to lower the server load and resume all the cron jobs. After shutting down some of the websites, now my account does 8.5GB Bandwidth per month which is 7 times less than what I was utilizing before with all the domains.At some point after keeping an eye on my access.log I found no reason to keep traffic from Russia and China, because I was getting only brute force attacks and website scans! Dreamhost lacks ability to install iptables and I had to ban them at configuration level. Which reduced my bandwidth to 56GB/mo (saved few gigs and server load)!

Now I know when, how and why I should upgrade my VPS and I know how important is to protect it against Brute Force Attacks, DDoS attacks, Network Scans, Web Scrappers, Bots and Search Engine Robots.
I was surprised what this tiny server can handle! After all it’s a tiny beast!
Epic Story!

Thanks! To my friend Mr. Gulik guiding me thru the beginner path of  the young sysadmin!

Screenshot with the benchmarks:

1 Star2 Stars3 Stars4 Stars5 Stars (10 votes, average: 4.00 out of 5)

Dreamhost VPS defence against network attacks

August 2nd, 2013 3 comments

I recently moved to my brand new DreamHost VPS just to find out how much better is than my shared hosting. I get a bit over 180000 hits for 24 hours, but it happened that my server was rebooting due to heavy load and excessive memory usage. Right now I’m using the VPS with 400MB of ram. It was rebooting like every 20-30 minutes, but it seemed that not all of the traffic was legit. Large amount was web page scrappers, regular search engine bots, hacker attacks (brute force, sql injections), etc and my server was benching against the heavy load. I tried installing iptables, but due to the ancient VM technology that dreamhost is using is not possible 🙁

So i had two options, to get my server back from the dead without paying tons of money for feeding all the automated traffic and dreamhost:

  1. iptables alternative (e.g. shorewall)
  2. htaccess ip blocking

For the faster and immediately efficient option I chose the second one, so I compiled a list with all the httpd.ip-filter.conf

In order to block China and Russia I’d recommend to create separate file that is included in your httpd.conf. Apache (if apache is used) is C language based program and once it loads the long IPs list in the memory will react super fast to any calls from IPs in the list. Unless you don’t have access to edit the httpd.conf I wouldn’t recommend adding this line in .htaccess file.

The list contains 8864 Russian networks and 5073 Chineese.

1. Download httpd.ip-filter.conf

2. Save the file in the folder where httpd.conf is and name it the way you want. I used httpd.ip-filter.conf

3. Open the httpd.conf and include the line ” include /path/to/the/httpd.ip-filter.conf ” (without the quotes).

4. Save the conf and restart the apache

If you don’t get any errors you should be all set!

After doing so, my server is now relieved! I get far less traffic and my VPS don’t die from excessive memory that is not used by legit traffic.

1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 4.50 out of 5)