Wednesday, March 28, 2007

Apache vs IIS

As mention earlier, Apache 2.0 has supported run on others platform. IIS will be one of the rival that now threatening by Apache 2.0. In terms of stability, expandability, robustness, indeed Apache 2.0 is better than IIS in any way. Apache's model uses parent and child process, generally the parent process does not thing, to let child process to handles request. If 1 of the child process malfunction, another child process will be brought up as an act of recovering. Unlikely to IIS 6.0, when some things go wrong with the process, the whole system halt. Because IIS does not support multi-threading. IIS been working a lot with the kernel, but the more code put in the kernel, the higher chance of operating system will fail. Apache has better expandability over IIS, the whole community built up apache, if there any thing which they have not discovered. The fix can be easily download from them.

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

According to Apache 2.0 new features, now on windows NT system uses utf-8 code for all filename encodings. So for other Unicode file system able to translate and view it on different language windows NT-based file system. But this feature doest not apply on non-NT based system like, windows 95, 98 , ME.

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

One of the module enhancements featuring by Apache 2.0. This mod_include implements an extended version of the Server-Side Includes (SSI) quasi-standard. Embedded programming constructs in a HTML document are evaluated effect immediately and expanded by the server before the document is sent to the client. The name of the module relates to a major goal of SSI

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)

LAMP, this acronym refers to a solution stack of free software programs, to run a dynamic web servers.

Quote from wikipedia,
  • 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.
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.

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

Apache 2.0 introducing the new IPv6 Support, that enable Apache adapt to a future proof software. What so special on IPv6, that the main improvement brought by IPv6 has tremendously increase the number addressed for networked devices, when IPv6 widely being implement in all new generation network devices, each mobile phone and electronic device will have a unique address.

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

One of modules enhancement in Apache 2.0, basically this work in a very simple way. By default, when client access to the server by without entering specific file name and file extension, typically server will search directory by index.html that control by mod_dir. If non of the file listing could be found in the directory, a listing of files in specific directory will be generated by server and icons will be represent matches file type.

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

Caching is a temporary file that stores in a static memory that frequently recall by client for reducing server load. this module provide two techniques for caching frequently requested static files.

Quote from Apache Module.

mod_file_cache caches a list of statically configured files via MMapFile or CacheFile directives in the main server configuration.

Not all platforms support both directives. For example, Apache on Windows does not currently support the MMapStatic directive, 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 MMapFile directive of mod_file_cache maps a list of statically configured files into memory through the system call mmap(). 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 be mmap()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 as rdist and mv do this. The reason why this modules doesn't take care of changes to the files is that this check would need an extra stat() every time which is a waste and against the intent of I/O reduction.

CacheFile Directive

The CacheFile directive of mod_file_cache opens 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 the sendfile() (or TransmitFile() 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 rdist and mv do 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

This module is one for the new features in Apache 2.0 that enable Apache works as a proxy/gateway. It allow proxying in FTP, HTTP/0.9, HTTP/1.0, HTTP/1.1, Connect (for SSL). Each of these proxy features work in separately modules. So you can choose which is needed for the Apache server.

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

Generally, this module working well on increase transfer by compressing content before it delivered to the client.You can speed up downloads or web page access time with Apache mod_deflate module. The mod_deflate module provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network. This decreases the amount of time and data transmitted over the network, resulting in faster web experience or downloads for visitors. This effectively decrease the load of bandwidth, saving the server traffic.

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

When apache developers first introduce Apache 2.0, there is one major concern goals that is one mudules able to modify the output of another. And the mechanism to do modifications are called filter. In the early stage it is hard for developers to write a filter, but now after developer has improved the interface of Apache, it makes things easier and possible.

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

Unix Threading is one of core enhancement features includes in Apache 2.0 new features.Multi-threading is a software term that means that the program does several things at once. In a traditional program, execution continues from one statement to the next in a linear and predictable fashion. In a multi-threaded program, one, two, or more parts of the same program can be executing at the same time. In Apache this means that a single copy of the server can handle multiple requests concurrently.

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

Module mod_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

There are quite a huge change on Apache 1.3 to Apache 2.o, Apache has become highly modularized. For Apache 1.3 it is just a simple core module that include basic features of HTTP server, when it comes to Apache 2.0 it no longer just a simple HTTP server but the extension power highly increased. Now the server can be add/drop desire modules as necessary.. Some newly implemented features are, Module filter,SSL modules and etc.Each modules has their own functionality, this will be discuss in more details in the later post

References:
1. Linux Journal - Apache 2.0
http://www.linuxjournal.com/article/6022

Monday, March 12, 2007

Apache HTTP server

After a week of findings, quite numbers of client server application out there.But, at last i have decided to choose a research on the most popular HTTP server, Apache.

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