Archive for March 15th, 2009

Website optimization…

I’ve picked up 3 short contracts in the last week to optimize websites. The real goal here is not so much optimizing the website as it is optimizing the web server. In every case, the web server was Apache, the most popular and widely used web server on the Internet.

Invariably, the client has set up a server using Ubuntu server edition or CenOS or some other Linux distribution. The base server choice is invariably a good one, but problems start to appear after going live and coming under load. These problems occur because the sysadmin who set up the server ignored a few simple rules:

  1. Package managers are good for setting up generic systems. For small loads, packaged Apache is fine. But once you start to play with the big boys, you must be prepared to build Apache from scratch. Apache needs to optimized to your hardware and needs to be stripped of cruft that you don’t need.
  2. Apache is a powerful server and is great for serving dynamic content. But if you have a lot of traffic, it can be overwhelmed trying to do too many things at once. Split the tasks and have a specialized, light-weight server like lighttpd server up your static content and leave just the heavy lifting for Apache.
  3. Optimize your database, too. Don’t focus on just the webserving. If you’re getting data from MySQL, look carefully at how it’s set up. I’ll be covering this as a separate note soon.

In short, you need to look at all of the processes and individual components. Often, when I’m called in, decisions such as hardware and server software have already been made and I’m required to work within those constraints. But even with hands tied, there’s a lot of things that can be done to improve website performance.

,

No Comments

Switch to our mobile site