Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

server optimization (See related posts)

- Why not use mod_negotiation for compression? That will allow you to use pre-compressed files and avoid per-request on-the-fly compression. You can automate this and use the most expensive/effective compression level (gzip -9 foo).

- Separate static content, dynamic content, and database onto separate machines.

- Serve static content from a machine with lots of RAM to allow OS- or server-level file caching. Check out a built-for-speed server like lighttpd.

- Compile a stripped-down version of your Web server using only the modules you need.

- For frequently-called, brain-dead utility work like “Bringing it all together”, avoid PHP like the plague. Write it in C using FastCGI.

- For big PHP, use the Zend Optimizer. Check out the PHP5 function benchmarks at http://byster.net/?page_id=48

- All the usual stuff: don’t follow symlinks, don’t use .htaccess files, don’t resolve client hostnames (move the logs to another machine and batch it later), etc..

- If you use SSL, buy a dedicated hardware SSL device that offloads crypto processing from the servers to it.

- When linking to directories, add the trailing slash. i.e. http://foo.com/bar/ rather than http://foo.com/bar. This avoids an HTTP redirect, which results in an unncessary HTTP transaction.

You need to create an account or log in to post comments to this site.


Related Posts