Forum Moderators: phranque

Message Too Old, No Replies

SSIs a problem?

         

nmjudy

6:35 pm on Aug 26, 2008 (gmt 0)

10+ Year Member



A client of mine has a static site that uses SSIs to make it pseudo-dynamic (6-10 SSIs/page). It's hosted on a dedicated server with a dual processor, 2gb ram and 7200 rpm hard drive.

During their peak traffic, the server slows down to a crawl because of the http requests. I would assume that the SSIs are hogging system resources as well. I've gone through their site and removed all unnecessary images and combined external javascripts and css to reduce http requests.

I was wondering if upgrading their server to a 8 core processor with 12gb of ram and a 15000rpm hard drive would make a huge difference. That would quadruple their processing and ram and double their disk speed.

My question is - which resource does a SSI use the most? CPU? Memory? If I pump up THAT resource, will the server be able to handle more http requests?

jdMorgan

7:03 pm on Aug 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's no easy answer, except to say that SSIs use both more CPU and more memory.

Back up and look at optimizing the whole thing; In addition to the things you're currently doing, check to be sure that images, CSS, and external JS files are properly marked as cacheable, having correct Cache=Control, Expires, and Last-Modified headers.

Look into caching and serving a static copy of any dynamic pages which *don't really need* to change with every single client request.

Look into serving your images and CSS from alternate subdomains, so as to improve the browser performance and reduce "hung" requests.

Get rid of unneeded whitespace in files: Turn off "pretty-printing" in your source code editors.

Do not allow scripts to request resources on this same server using HTTP; Use internal filesystem requests instead.

Remove or reduce in scope any reverse-DNS checking in access control code, if any. For example, check rDNS only on "page" requests, and not for included-resource requests.

There are million things you can do to improve performance, most of which I'm sure I forgot to include... :)

Jim

nmjudy

1:01 pm on Aug 27, 2008 (gmt 0)

10+ Year Member



Thanks Jim!

I was considering having one working copy of the site. During the peak traffic months, I would run a script that converts all the pages into static pages by replacing the contents of the SSIs in the page. It won't change how they do things now, but will greatly reduce the load on the server by not having any server side calls.

When you mention "caching" a copy of images, CSS, and external JS - is that something that only defined in the header? How do I "properly mark" them?

They have another dedicated server that they use for a mailing list, blog and flash scripts. It will eventually hold several smaller sites that traffic can be diverted to.

Can a subdomain of a domain point to a different IP than the domain site? If so, any ideas on how they can use this other server to help out during peak times?

jdMorgan

1:30 pm on Aug 27, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> When you mention "caching" a copy of images, CSS, and external JS - is that something that only defined in the header? How do I "properly mark" them?

This is not a simple subject, but you use Apache mod_headers and mod_expires to send cache-control headers to the client, depending on what file (not URL) is requested. Try a Web search for "caching tutorial" to get started.

> Can a subdomain of a domain point to a different IP than the domain site? If so, any ideas on how they can use this other server to help out during peak times?

Hostname to IP address mapping is done with A and CNAME records in the DNS Zone file for the domain. So yes, in most cases, subdomains can be pointed to any IP address you like. The limitations --if any-- would be due to the tools you use to manage your DNS.

As for "helping out during peak load times," that is a load-sharing issue. I will defer to professionals who are competent in configuring enterprise-class load-shared systems for that. :)

Jim

nmjudy

2:44 pm on Aug 27, 2008 (gmt 0)

10+ Year Member



What if it made sense to take one section (directory/folder) of their site and create a separate domain that could reside on 2nd server?

If I kept the same file structure, would there be a way to redirect just that folder to the new domain (same subfolders and page names)? And would that redirecting .htaccess file be in THAT folder versus the root?

Shouldn't that pass pagerank? Or would I be creating a monster?