Wednesday, March 28, 2007
Apache vs IIS
Why the whole word web servers over 60 percents are using Apache, because compare the setting up fees, Apache is complete free. But when you need to run a server platform you are buying an high end version of Microsoft Windows, because IIS is built-in Microft Windows as part of a features.
Reference:
1. Apache VS IIS
http://searchwinit.techtarget.com/originalContent/0,289142,sid1_gci833798,00.html
Monday, March 26, 2007
Native Windows NT Unicode Support
References:
1. Apache 2.0 Core enhancements
http://httpd.apache.org/docs/2.0/new_features_2_0.html
Sunday, March 25, 2007
mod_include - Server-Side Includes (SSI) Implementation
References:
1. Apache Module mod_include
http://httpd.apache.org/docs/2.0/mod/mod_include.html
Saturday, March 24, 2007
HTTPD Accelerators
Web server performance can be improved in many ways. Despites of upgrading the hardware running on server, performance gain can be done by applying HTTPD accelerators. Users can either run a specialized web server to handle simple static requests and pass all other requests to Apache or have a small HTTP server built into the kernel itself.
phhttpd serves all requests from a single process and uses the "sendfile" system call to put most of the work back into the kernel, besides interpreting the HTTP protocol. phhttpd cannot run on its own, as it requires a backing full server that knows how to talk with phhttpd, such as Apache. The two servers establish a line of communication while running. phhttpd listens to all the incoming connections, and if it can't parse the request for whatever reason, it hands the connection over its line to Apache to process. phhttpd keeps an aggressive cache of content that doesn't change at each request. It uses this content to reduce the amount of processing that must be done per request. It also features a nonblocking event model that allows a single thread to serve many connections. The number of threads may be scaled to match the size of the hosting machine.
To cut out the operating system overhead, a small HTTP server can be placed into the kernel itself to respond to requests for static files. It runs from within the Linux kernel as a module, handles only static web pages and passes all requests for nonstatic information to a regular user space web server such as Apache. Static web pages are not complex to serve, but they are important because virtually all images are static, as are a large portion of the HTML pages. A regular web server has little added value for static pages; it is simply a "copy file to network" operation, and the Linux kernel is good at this.
References:
1. PHHTTPD
http://docsrv.caldera.com:8457/en/Howto/phhttpd/index.html
Friday, March 23, 2007
LAMP (software bundle)
Quote from wikipedia,
These the most famous free/open-source software programs, that allow users to create their own webservers without paying a cent for licensing. Apache running on Linux be the perfect match ever, since Apache has better compatibility running on Unix-like operating system. PHP one of the most famous open-source programming language widely use by web developers, and pairing with MySQL featuring multithreaded, multi-user, SQL Database Management System. By combining these, it makes Apache web server has a power strenght competeting with the rivals.
- Linux, (referring to the operating system);
- Apache, the Web server;
- MySQL, the database management system (or database server);
- PHP (Sometimes Perl or Python), the programming language.
References:
1. LAMP
http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29
Thursday, March 22, 2007
Multiple Process Modules(MPM)
The original reason for creating Apache 2.0 was scalability, and the first solution was a hybrid web server; one that has both processes and threads. This solution provides the reliability that comes with not having everything in one process, combined with the scalability that threads provide. The problem with this is that there is no perfect way to map requests to either a thread or a process.
On platforms such as like Linux, it is best to have multiple processes each with multiple threads serving the requests so that if a single thread dies, the rest of the server will continue to serve more requests. Other platforms such as Windows don't handle multiple processes well, so one process with multiple threads is required. Older platforms which do not have threads also had to be taken into account. For these platforms, it is necessary to continue with the 1.3 method of pre-forking processes to handle requests.
There are multiple ways to deal with the mapping issue, but the cleanest is to enhance the module features of Apache. Apache 2.0 sees the introduction of 'Multiple-Processing Modules' (MPMs) - modules which determine how requests are mapped to threads or processes. The majority of users will never write an MPM or even know they exist. Each server uses a single MPM, and the correct one for a given platform is determined at compile time.
References:
1.Multi-Processing Modules
http://httpd.apache.org/docs/2.2/mpm.html
IPv6 support in Apache 2.0
References:
1. Apache 2.0 core enhancements
http://httpd.apache.org/docs/2.2/new_features_2_0.html
Wednesday, March 21, 2007
Apache Module mod_proxy_balancer

Newly added features in Apache 2.1, it is actually additional modules that work with mod_proxy. Both modules must be exist in the server to get the ability of load balancing for proxy server, it support FTP, HTTP protocols. There are two load balancer scheduler algorithm.
1.Request Counting Algorithm
According to Apache Documentation
, The idea behind this scheduler is that the load balancer will keep tracking on the client request make sure each gets the equal amount of requests.2.Weighted Traffic Counting Algorithm
According to Apache Documention,the idea behind this scheduler is very similar to the Request Counting method, This is also a normalized value representing their "share" of the amount of work to be done, but instead of simply counting the number of requests, we take into account the amount of traffic this worker has seen.References:
1. Apache Module mod_proxy_balancer
http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html
Tuesday, March 20, 2007
Apache Module mod_autoindex
References:
1. Apache Module mod_autoindex
http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html
Monday, March 19, 2007
Apache Module mod_file_cache
Quote from Apache Module.
mod_file_cachecaches a list of statically configured files viaMMapFileorCacheFiledirectives in the main server configuration.Not all platforms support both directives. For example, Apache on Windows does not currently support the
MMapStaticdirective, while other platforms, like AIX, support both. You will receive an error message in the server error log if you attempt to use an unsupported directive. If given an unsupported directive, the server will start but the file will not be cached. On platforms that support both directives, you should experiment with both to see which works best for you.MMapFile Directive
The
MMapFiledirective ofmod_file_cachemaps a list of statically configured files into memory through the system callmmap(). This system call is available on most modern Unix derivates, but not on all. There are sometimes system-specific limits on the size and number of files that can bemmap()ed, experimentation is probably the easiest way to find out.This
mmap()ing is done once at server start or restart, only. So whenever one of the mapped files changes on the filesystem you have to restart the server (see the Stopping and Restarting documentation). To reiterate that point: if the files are modified in place without restarting the server you may end up serving requests that are completely bogus. You should update files by unlinking the old copy and putting a new copy in place. Most tools such asrdistandmvdo this. The reason why this modules doesn't take care of changes to the files is that this check would need an extrastat()every time which is a waste and against the intent of I/O reduction.CacheFile Directive
The
CacheFiledirective ofmod_file_cacheopens an active handle or file descriptor to the file (or files) listed in the configuration directive and places these open file handles in the cache. When the file is requested, the server retrieves the handle from the cache and passes it to thesendfile()(orTransmitFile()on Windows), socket API.This file handle caching is done once at server start or restart, only. So whenever one of the cached files changes on the filesystem you have to restart the server (see the Stopping and Restarting documentation). To reiterate that point: if the files are modified in place without restarting the server you may end up serving requests that are completely bogus. You should update files by unlinking the old copy and putting a new copy in place. Most tools such as
rdistandmvdo this.
References:
1. Apache Module mod_file_cache
http://httpd.apache.org/docs/2.0/mod/mod_file_cache.html
Sunday, March 18, 2007
Apache Module mod_proxy
Apache can be config in both a forward and reverse proxy mode.
Generally, forward proxy let apache proxy act as a middle contact server like and agent. Client request will be done by proxy server and requested content will be return to the Client. Normally forward proxy is use on client that are restricted by firewall, so forward proxy could make request for client.
Typically, reverse proxies are utilized in front of web servers. All connections coming from the Internet addressed to one of the web servers are routed through the proxy server, which may either deal with the request itself or pass the request wholly or partially to the main web server.
References:
1. Apache Module mod_proxy
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html
Saturday, March 17, 2007
Apache Module mod_deflate
References:
1. Apache Module mod_deflate
http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
Friday, March 16, 2007
Filter for Apache 2.0
Arcodding to Apache 2.0 Basics by Ryan Bloom. In Apache filter terminology, each chunk is stored in a bucket, and lists of buckets form brigades. Lists of brigades can then create a Web document. Filters operate on one brigade at a time, and are called upon repeatedly until the entire document has been processed. This allows the server to stream information to the client.
References:
1. Apache Filter
http://www.projectcomputing.com/resources/apacheFilterFAQ/#con-what
2. Writing filter for Apache 2.0
http://www.onlamp.com/pub/a/apache/2001/08/23/apache_2.html
Thursday, March 15, 2007
Unix Threading
The current version of Apache does something like this already: it can handle multiple requests by running several copies of the server. However this is not multi-threading because the running programs are different copies, each of which is a different process. In a multi-threaded sever, a single process could be handling a number of requests at the same time. The advantage this gives is two-fold. Firstly, the operating system does not need to keep swapping between different processes, which is slow. Secondly, any static information shared between all the requests (such as the server configuration) can be shared between all the threads running at the same time, instead of being repeated in each process
References:
1.Multi Threading
http://www.apacheweek.com/issues/97-11-28
Wednesday, March 14, 2007
Apache Module SSL
This module provides SSL v2/v3 and TLS v1 support for the Apache HTTP Server, it relies on OpenSSL to provide he cryptographic engine.
SSL/TSL
Arcording to wikipedia, TLS, a.k.a., SSL (Secure Sockets Layer), establishes a private end-
to-end connection, optionally including strong mutual authentication, using a variety of cryptosystems. Initially, a handshake phase uses three subprotocols to set up a record layer, authenticate endpoints, set parameters, as well as report errors. Then, there is an ongoing
layered record protocol that handles encryption, compression, and reassembly for the remainder of the connection. The latter is intended to be completely transparent
Open SSL
OpenSSL is an open source implementation toolkit for SSL/TSL protocols to provide a fully functionality cryptographic library
References:
1. Apache Module mod_ssl
http://httpd.apache.org/docs/2.0/mod/mod_ssl.html
2. OpenSSL
http://www.openssl.org/
Tuesday, March 13, 2007
Apache 2.0
References:
1. Linux Journal - Apache 2.0
http://www.linuxjournal.com/article/6022
Monday, March 12, 2007
Apache HTTP server
Apache HTTP server is an open-source and free software under Apache license, even though is free software license but not under GPL license because it has certain patent termination that does not require by GPL.
Since 1996 it has been the most popular HTTP server and it plays an important role in world wide web growth. The key successful for apache HTTP server is that, it it not dedicated on specific platform, but many. I.e.Unix-like systems, Microsoft Windows, Novell NetWare, Mac OS X and other operating systems.
In the earlier version of Apache(version 1.x), it has not been fully optimized for non-Unix Based system, some features may not be functioning well in non-Unix based system. For later version of Apache(version 2.x) improvement will be discuss in the next entry.
References:
1. Apache HTTP server project
http://httpd.apache.org/
2. Apache HTTP server version1.3
http://www.apache.org/dist/httpd/Announcement1.3.html