homepage Welcome to WebmasterWorld Guest from 54.163.72.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

    
UK server using US images = slow pages
can I speed this up?
GerBot




msg:386988
 7:49 pm on Dec 30, 2005 (gmt 0)

Hi Guys,
I've got a UK website and for SEO reasons I've recently moved to a new UK server.
However I left my database and images being served from my original US server as the bandwidth is much cheaper and I'm scared about moving the entire website infrastructure.

The problem I have is that now the pages which call back to my US server through php to find images and information are loading much slower.
Average page load time has gone from 1 second to 10 seconds.

I know the server move is the cause of the problem because I have a similar site still totally hosted in the US which is still fine.

Not only is the new site slower (only when loading the US hosted images, the rest of the site is faster)but it appears that my webpages are completely downloaded before they are shown, the pages used to load one image at a time which (even on a dial up connection) would let the visitor know the page was coming.

So My questions are:
1) Is it possible to make the property images load one-by-one (maybe using separate tables or divs)
2) Am I going to be forced to move everything to the same server or can I add another server in a private LAN?
3) Is it generally accepted that a UK server calling images from a US server will be very slow?

thanks for any help/info you can provide me.

 

Leosghost




msg:386989
 10:41 pm on Dec 30, 2005 (gmt 0)

You could attempt to get around this by using image pre loaders in the background ..the effectiveness of this is going to depend on your design layout ..

Also ten seconds to load image pages! I run some 90% image sites with images served from the US and have nowhere near that long to wait!..am on dsl in France and incoming speed is an actual 250kb per sec max ( they tell me 6.00 to 8.00 megs ..they lie ..I knew they did when I signed up ..they lied less than the "competition" of which we dont have much )..

How big is your average image? remember most ( 98% ) of people run at definitions that mean anything over 72dpi is wasted on them ..run low to medium res "teaser" "click throughs" at entry pages and high res as lead outs ( with warnings about "large files" etc )..

BTW your UK server space and specs costs way less than french for the same deal so be relatively happy..

doesn't geotargeting by search engines suck?..Let the searcher decide the relevancy of where the data is hosted!

GerBot




msg:386990
 11:43 pm on Dec 30, 2005 (gmt 0)

thanks Leosghost
the images are small 20-50kb and 9 on each page.

I'll look into the image preloaders, thanks for the tip

py9jmas




msg:386991
 11:51 pm on Dec 30, 2005 (gmt 0)

It sounds like you've got PHP scripts running on the UK server querying a database on a US server. Round trip time between the UK and US is about 70msecs. For each database query, PHP has to wait at least 70msec for the reply. If you have 20 queries, that'll add at least 1.4 seconds to the time it takes PHP to build the HTML.

From a responsiveness angle, the first thing I'd do is get PHP and the database nearer to each other, or at least on the same continent.

GerBot




msg:386992
 11:56 pm on Dec 30, 2005 (gmt 0)

thanks py9jmas,
So having them all on the same server would really speed things up then.

what about if I put the two servers next to each other in one UK data centre in a private LAN?

is that going to be close to the performance I'd get from using one server for all the work?

Leosghost




msg:386993
 12:00 am on Dec 31, 2005 (gmt 0)

Also make the images "progressive" type if jpegs ..( gives 'm something to keep them interested whilst the rest is sneaking in ) given the sizes you are using your load times are long ..thats only 250 to 600 kb including estimated html and copy ..

Preload ..java scripted feed or whatever

Design later loading stuff to come in below the fold

Combine both ideas and use "thumbs" page and let "them" interrupt your sequence of "sneaky" preloading larger images via script interrupts/variables/ifs..you can script the .js as an include at under 4kb at onload ( this may slow down older browsing machines if they choose out of sequence jumps to "large image" as the processor load is heavy at under pentium III or equivalent and with only 32 to 64 ram ) ..depends on your target demographic ..and how fast they can read your text whilst they are "waiting" for your images to preload in the background

GerBot




msg:386994
 12:34 am on Dec 31, 2005 (gmt 0)

Design later loading stuff to come in below the fold

interestingly I think because the bulk of the page is leaded via the php scripts and the US sever the entire page does not display until it is all downloaded. I think this is because the php is loaded before the html code.

thanks for the other ideas - I'll run some tests to see what the improvement is like.

So far it looks like I'll still need to relocate the first server out of the US

GerBot




msg:386995
 12:45 am on Dec 31, 2005 (gmt 0)

py9jmas - looking at your reply some more I think I could have more than 20 queries. But I'm not sure exactly how I would go about calculating how many queries I have.
I know I have 10 different php scripts on the page that call the US server and one database connect script. But I'm not sure how many queries each script contains.
What is the question I would ask to decide if a queries is needed?

And so you know what the round time equivalent would be for the private server LAN alternative?

thanks again

Leosghost




msg:386996
 1:07 am on Dec 31, 2005 (gmt 0)

Read that you were php( actually missed it "php" completely the first reading ;) and py9jmas later stuff after posting my last reply ..

yep ..if using php "calls" ..move your server will make the biggest difference ..design etc are just tweaks compared to that..

Why not keep your images on the same server as you are running your pages from? One server is almost always better than 2 given modern hosting specs ..

GerBot




msg:386997
 1:22 am on Dec 31, 2005 (gmt 0)

I agree with you Leosghost,
but I'm so nervous about changing my core business server. I just know stuff will go wrong and I'll be offline for days.

at this stage I've made the tweeks suggested and I'm in the process of merging all the php US server requests into one big php include. In theory this is going to reduce the number of UK > US server requests down to two (database access & everything else).

the final option is to move the server but as above I'm scared and the increased bandwidth costs are the icing on the cake

Leosghost




msg:386998
 1:35 am on Dec 31, 2005 (gmt 0)

So do the rest of your mods and ..run a thumbs page or pages on the UK box and serve the larger images out of the states as per earlier ..

UK servers are what ..? about 3 times the cost of US plus bandwidth at 3 to 5 times US costs? ..images are your largest "hog" ..donc "no brainer" ..

Go through your logs with a fine toothed comb and see who bails out fast after arriving , where they came from "geo" , how fast they got maybe tired of waiting , what files , image or other did they call just before they went ..and what they did during the time they were onsite ..

And if they do so in numbers/percentages large enough to make any difference to your sales or ROI..given the possible increase in overheads to maybe mitigate their actions.

Be carefull you are not chasing shadows here ..it can be an expensive and relatively unproductive game

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved