Tuesday, March 6, 2012

APACHE :-

Apache is an open source web server which guarantees availability of active websites online . The original version of apache was especially designed for unix-like operating system Nowadays, it can be implemented on variety of O.S. platforms. According to Apache Software Foundation and Net craft web server survey, 65% of websites on the internet uses Apache server.

 Features of Apache :-

1) Modularity

2)Uniformity

3)Portability

4)Powerful and Flexible webserver

5)Easily operable on wide variety of OS Platforms.





which made possible technologies like apache modules an API for apache module enabling features such as PHP, Mysql integration, URL Rewrite, PHP Handlers, Global variables and other features.

Apache Web Server Versions :-

Apache 1.3 :-

-Useful configuration files.
-Windows and Netware support
-DSO Support
-APXS tool (Basically APXS is located at /usr/local/apache/bin/apxs  and the APXS is a tool used for building and installing extension modules for Apache HTTP Server).

Apache 2.0 :-

-Most comprehensive configuration files.
-Efficiency
-Supports IPV6 version.
-Unix Threading
-Introduced new compilation system and multi-langauge error messaging.

Apache 2.2 :-

-Offers more and new flexible modules.
-User Authentication and Proxy caching features.
-SQL Support
-Support files exceeding 2Gb.


--------------------------------------------------------------------------------------------------------------------------

You may felt boredom while reading below concept,  But its the core and most important functional body of Apache.


 MPM  :-

MPM stands for Multiple Processing Modules.  The main purpose of MPM  is binding network ports on machine, accepting request and dispatching children to handle the requets.

Apache implements specialized MPM. MPM must be choosen while configuring and must be compiled in the server. MPM behaves like Apache module, the basic difference is only one MPM must be loaded into the server at any time.

List of Apache MPM modules are available. Refer the link for the same :-

http://httpd.apache.org/docs/2.0/mod/

Some of the well know and widely implemented MPM's :-

1) Prefork :-

"The prefork MPM runs multiple processes with each child process handling one connection".

Merits :-

-Stable and Secure
-Compatible with all implementations (cgi, fcgi, suPHP, DSO).
-Failure of one process wont affect other connections.

De-Merits :-

-Simultaneous execution of multiple processes >> indicates more memory usage.

A typical configuration of the process controls in the Preform MPM could look as follows:

StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 256
MaxRequestsPerChild 1000

More Information

2) Worker :-

"The worker MPM has one control process that launches multi-threaded child processes which handles one connection per thread".

Merits :-

-Multi-threaded design utilizes less memory usage irrespective of high connections.
-Fast performance.

De-Merits :-

-DSO Module Incompatible.

A typical configuration of the process-thread controls in the Worker MPM could look as follows:

ServerLimit 16
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25

More Information

3) Event :-

"The Event MPM is similar to worker MPM but allows high performance by passing some of the listener thread work  to each work processes. Each process can act as worker or listener depending on need and activity in CPU for respective time".

Merits :-

-Better optimization.

De-Merits :-

-DSO Module Incompatible.

 A typical configuration of the process-thread controls in the Event MPM could look as follows:

KeepAlive On
KeepAliveTimeout 2
MaxKeepAliveRequests 20


More Information


Distinguish between Perform, Worker, Event MPM's



Configurations Definitions :-


* StartServers :- The number of  child processes created  on startup.

*MinSpareServers : Minimum number of idle child processes. apache will continue to create new processes. This should be high enough, idle processes should be on hand.

*MaxSpaceServers : Max number of idle child process, parent process will kill idle process in excess of limit.

*MaxClients : Max number of simultaneous request i.e Max number of Apache requests.

*MaxRequestsPerChild : Max number of request a child process will handle before it dies. if set to 0 ; process will never die

*ServerLimit : Max number of child process, must be greater on equal to maxclient divided by thread per child.

*ThreadsPerChild : No. of threads per child process.

*MaxSpareThread : Min no.of idle thread.

*KeepAlive ; allows for persistent connection to improve latency for connections that require multiple requests.

*KeepAliveTimeout :  Length of time connection will be kept open for further request before closing.

*MaxKeepAliveRequests : Max no. of requests through a single keep alive connection.







No comments:

Post a Comment