PDA

View Full Version : Load balanced time anomaly


David
29th Oct 2004, 08:13 am
Some of you may know that I recently moved the CADTutor forum from an account at Supanames where it had lived for 2 years to my new "load balanced" Linux account at Fasthosts. The move went well, thanks again to TextPad - I had to split the 32MB SQL file into chunks of less that 2MB in order to restore it. It was a days work moving the database and setting up phpBB (yes, I decided to stay in the Open Source camp and not go the IPB route) but there were no problems. I spent another day adding some mods and hacks to improve functionality and user experience and another day or so skinning the board. You can see the results here (http://www.cadtutor.net/forum). User feedback has been good and the forum feels very much faster than it did before - other users have confirmed this.

Over the last few days I had noticed some unusual behaviour by the forum software which puzzled me. During some experimentation I noticed that if I repeatedly refreshed the forum index page, the "The time now..." output at the top of the page jumped forward and backward by exactly one hour!

My first thought was - oh no, what have I done! Assuming that one of my hacks had caused the problem. To test this, I wrote a very simple php page containing this code:
<?

$time = date ('H:i:s');
print $time;

?>

All it does is get the time, format it in hours, minutes and seconds and then print it to the web page. You can see the page here (http://www.cadtutor.net/time.php). Loading the page into a browser and refreshing it a few times showed the "timeslip" effect but not as frequently as on the forum. I then fired up another browser window and loaded the same file. Refreshing both windows independently showed a greater incidence of the effect.

By this time I knew that the problem was with the server and nothing to do with the forum but I couldn't explain the behaviour. Then I realised that on a "load balanced" domain, the http requests are spread across a number of servers. It seemed obvious that at least one of those servers was not in synch with the others and that this was the cause of the problem.

I contacted Fasthosts support yesterday but have had no reply yet. I'll keep you informed. Just in case you're interested ;)

francis
29th Oct 2004, 08:30 am
I thought you'd moved this onto Clook?

David
29th Oct 2004, 11:12 am
I have a rs-1 reseller account with Clook (http://www.clook.net/services/resellers.php) and that's where I keep all my client domains and the Website Architecture stuff. The rs-1 account has a monthly bandwidth limit of 24GB and that is easily sufficient for all the domains in my care except 1.

CADTutor now shifts 20GB per month and rising. Over 100,000 user sessions last month. That's relatively small beer compared with commercial sites but it's well above most personal or amateur sites. I decided I needed a dedicated hosting account and one without a bandwidth limit. So a few moths ago, I closed my old Fasthosts reseller account and moved the CADTutor.net domain to a Fasthosts Linux Expert account. This gives load balanced webspace, a couple of MySQL databases, spam and virus mailboxes etc. for under £20 per month and the Google Ads easily cover that.

So far this has proved to be a really good decision. The site is now miles faster than it was before. Both http and ftp are noticably quicker. At least 80% of the 100 or so spams I used to get don't even make it to my mailbox and I'm able to consolidate all the various bits of CADTutor, the forum, the UK area etc. into a single hosted area. This gives lots of scope for further integration of the parts. For example, I can now show the latest forum posts on the CADTutor home page - haven't done this yet but it's on my "to do" list.

So, I'm happy - until I noticed the time anomaly. Obviously, the issue never was obvious with the static site but now that the forum is on there, the issue becomes very serious.

Tom
29th Oct 2004, 11:43 am
The Alexa - site info (http://www.alexa.com/search?amzn_id=alexa65-tb-20&q=cadtutor&p=TBChrome) has not detected the increased speed yet.

David
29th Oct 2004, 01:26 pm
Hmm, the site analysis is very interesting. I doubt that the details have been updated since I moved it. It also depends how it is measured. The home page currently loads in about one second over broadband. The screen grab is at least 2 years old but the traffic analysis is pretty much up-to-date although the results are slightly erratic compared to the actual stats - ballpark they're about right. How do they do this? Do they simply cull info from the Alexa toolbar - that surely wouldn't give them a big enough sample. I do like the ability to compare traffic from various sites. :D

http://www.websitearchitecture.co.uk/watson/postimages/graph01.gif

I am, however, slightly unnerved by the fact that my address and telephone number are there for all to see!

Incidentally, the cadtutor.com domain is up for renewal in March 2005. I am hoping that the owner won't bother to renew it and I can snap it up. Fingers crossed.

David
29th Oct 2004, 02:40 pm
Just had an email from Fasthosts support:

One of the server's clocks was 1 hour out. This has been corrected and you shouldn't see this problem again. I hope this has been of help.

You bet it helps! Another victory for DW :geek:

I do rate Fasthosts, there's no doubt that their infrastructure is streets ahead of most hosts but you do need to keep an eye on them o:)