Apache Web Server Performance Tuning and Quick Security Tips
Apache Web Server Performance Tuning and Quick Security Tips
In WWW web publication, most of Apache Server Administrator's thinking are pointed to one issue, "How can I Improve the Performance of Apache Web Server, not Sacrificing the Security of Web Application"
In September 2008, Web Server Survey shows that out of 181,277,835 active web sites (181 Million), Apache Web Server is being used as web server on 91,418,412 (91.4 Million) domain or sub domain.
As Apache is most favorite web server among the web site publisher, one web administrator must know how can improve his site performance in very less effort. Before going to tune any webserver, you must know the clear idea that how HTTP Protocol Work!
If you maintain a Apache web server, having few visitor in hour or day even month, the default configuration comes with Apache Web Server Distribution enough to handle the HTTP request from visitors browser. But think about the server having thousand of visitor in every hour, this is become very difficult to maintain the performance of web site.
Removing a simple image from site can increase the performance of website in tremendous way. Bellow I am giving some quick tips to tune your server to handle thousand of page request from your visitors browser.
Today I will discuss on 2 option of Apache Webserver related to 'Cache' or 'Caching'.
There is a good news that by default apparently or any standard install of Apache Web Server generate 'Etags' and 'Last-Modified' response header. See bellow the HTTP request and response on a Standard Apache Installation on OS CentOS:
HTTP Client Request:GET /favicon.ico HTTP/1.1
Accept: */*
User-Agent: Chrome/0.3.154.0
Host: www.bauani.org
HTTP Response from Server:HTTP/1.1 200 OK
Last-Modified: Fri, 29 Oct 2004 14:51:01 GMT
ETag: "163c078-8be-418258d5"
Content-Type: image/x-icon
With this 'ETag' and 'Last-Modified' header, browser can understand the file change or not in future request. Say now I am visiting another page of this site, so browser will issue a request for this favicon.ico file, but diffrent as browser cache has a copy of this file, it will issue same request but includes few extra options like bellow:
Request:GET /favicon.ico HTTP/1.1
Accept: */*
If-Modified-Since: Fri, 29 Oct 2004 14:51:01 GMT
If-None-Match: "163c078-8be-418258d5"
User-Agent: Chrome/0.3.154.0
Host: www.bauani.org
Responce from Server:HTTP/1.1 304 Not Modified
ETag: "163c078-8be-418258d5"
By this extra 2 option 'If-Modified-Since' and 'If-None-Match' browser is issuing a condition to download the /favicon.ico and server responce '304 Not Modified' mean, browser not need to re-download this file as this file is already in browser cache and didn't modify scince last downloded. If you are Server administrator of www.bauani.org, you just save a little bandwidth equvalent to favicon.ico file size.
Source: http://www.sweeting.org/mark/blog/2007/02/06/website-performance-tip-for-apache
Labels: HTTP Protocol

0 Comments:
Post a Comment
<< Home