Forum Moderators: phranque

Message Too Old, No Replies

Redirect perm and higher server loads

         

Doood

4:23 pm on Dec 9, 2005 (gmt 0)

10+ Year Member



The old links pointing to my site were like mydomain.com/referrers/in.php?id=user for my referrers script
and it redirected to my main page but I just removed the script and the /referrers/ directory so Redirect Permanent was used in htaccess to redirect all traffic going to /referrers/ to now going directly to the main page.

Now my server load has increased significantly, from 20 to 80 and now stuck at 40. I think most referrers changed their links but a few didn't and a small amount of traffic is still being sent to the /referrers/ directory.

Should the redirecting cause a higher server load? I thought it would go down now that the script isn't being used.

jdMorgan

4:36 pm on Dec 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Understand that a redirect involves both the server and the client. The client requests the old URL, and the server then responds by sending a message to the client that contains the new URL. Now the client has to re-request the resource that it was looking for the first time, but using the new URL.

So the effect on the server is that it must handle two HTTP requests for every resource. And by resource, I mean every page, every image, every external CSS stylesheet, etc.

If the load is really killing your server, you could reduce your server load a bit by selectively redirecting only the most important pages, or by redirecting *only* pages, and letting the image, stylesheet, etc. requests through without redirecting them. But a redirect is not the end solution; It *is* important to get those backlinks on other sites updated if at all possible.

Also, make sure that you have implemented proper cache-controls on your static content, so that, for example, images and other common page elements are not re-requested from your server every time they appear on a page.

Another 'also' -- Check your raw server error log and make sure you have not inadvertently put the server and client into an 'infinite' redirection loop, with the page being served only after one or the other of them 'times out' on redirecting.

Jim

Doood

5:14 pm on Dec 9, 2005 (gmt 0)

10+ Year Member



Oops, the server load is actually only 0.40 and is not killing my site.

I don't see why any images or anything would have to load twice. The referrers directory doesn't even exist anymore and they're only loading the main page once. Seems to me that the only thing that would cause a load would be the redirecting process of going from old to new url.

I've got a few other redirects that are handling loads of traffic to new url's and have been for a long time any they don't seem to create any extra load.

I've also been using two referrers script for the past few months and just got rid of one, just figured the load had to go down but struck me odd that it went up.