call Byte22 on 01283 512333 to discuss your next project

Why Node.js

posted in byte22 by Phil on Wed Jun 25 2014

Talking to one of our good clients recently over at http://www.eventshouse.co.uk.

Their website has a simple Custom CMS system written in PHP and MySQL.

We noticed pageload times are slow on the current site and an upgrade to Node.js and MongoDB might be a good idea.

To highlight the benefits of the New Server Tech, I ran a simple benchmark against the client's old PHP site and our own Node.js website.

The benchark consists of timing 10 x simple GET requests for the HTML of the homepage of both sites.

Results

[phil@athena:~] -> for i in `seq 1 10`
time curl http://www.eventshouse.co.uk/ -s > /dev/null
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.46s user 0.01s system 53% cpu 0.869 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.414 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.417 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.409 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.412 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.415 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.416 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.417 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.420 total
curl http://www.eventshouse.co.uk/ -s > /dev/null  0.01s user 0.01s system 3% cpu 0.414 total
[phil@athena:~] -> for i in `seq 1 10`
time curl http://byte22.com/ -s > /dev/null
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 19% cpu 0.074 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 19% cpu 0.077 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 19% cpu 0.074 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 20% cpu 0.071 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 20% cpu 0.070 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 20% cpu 0.072 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 21% cpu 0.071 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 18% cpu 0.077 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 18% cpu 0.080 total
curl http://byte22.com/ -s > /dev/null  0.01s user 0.01s system 21% cpu 0.071 total

 

The final number is the time in seconds for each request.

http://www.eventshouse.co.uk/ : 400ms on average

Not too bad you might think. But...

http://byte22.com : 60ms on average

8 times faster...!!

 

So, who cares...?

 

1. You should.

Site speed is the Number 1 reason people "bounce" from a website, they leave and never come back.

In 2010 it was a cliche to get "Page load less than 1 second", these days with mobile and global internet growing exponentially the need for fast page times are higher than ever and, more often than not, sub 1 sec load times, just aren't good enough anymore.

2. Google.

Google indexes more than 1 billion webpages. http://www.worldwidewebsize.com/

Google Total Indexed Pages

Google tries to crawl their index as often as possible, most sites get partially crawled everyday.

If your website is slow to request, or for users to use, Google WILL crawl your website less, and down grade the content on your site, causing fresh content to be stale or missed altogether.

The results surprised me, Node.js is known for speed and effencity.

 

What can I do about my slow website ?

First thing to do is identify if you have an issue.

Byte22 can run custom reports on your website to help identify Website Issues

Website speeds can be a complex issue, if you require expert advise please feel free to email me, phil@byte22.com anytime.