Apache Week
Issue 78, 15thAugust1997:

Copyright 2020 Red Hat, Inc

In this issue

Next Release to be Apache 1.2.3

The next maintenance release of the Apache 1.2 series will be called Apache 1.2.3. This is identical to the proposed 1.2.2 but with a higher version number due to slight internal confusion. Just before a release is made, a "final" snapshot of the Apache code is taken and turned into a distribution archive. Developers then test this archive on their sites before giving the release the OK. Normally this snapshot is marked as being a development version, so that if there are any problems development can continue. However the snapshot for 1.2.2 was marked as version "1.2.2". When some (small) changes were made to the snapshot, the version number had to be incremented to 1.2.3 otherwise there would have been two different distributions both marked as "1.2.2".

Apache 1.2.3 will be released shortly. It will fix the same bugs as given in last week's issue, plus a few proxy module bugs.

Apache Status

Release: 1.2.1 (Released 6th July 1997) (local download sites)
Beta: None
Alpha: 1.3a1 (Released 23rd July 1997) (local download sites)

Patches to Apache 1.2 bugs will be made available in the apply to 1.2.1 directory on the Apache site. Some new features and other unofficial patches are available in the 1.2 patches directory. For details of all previously reported bugs, see the Apache bug database and Known Bugs page. Many common configuration questions are answered in the Apache FAQ.

Faster Performance Accepting Connections

Apache works by creating a number of child processes, all of which enter a loop where they wait for a request then process the request. For most operating systems Apache has to be careful to ensure that only one child tries to accept a new connection at once. This is called "Serialised Accepts". To do this it has to implement "mutual exclusion" between the processes so only one process gets permission to accept the new connection at any one time. This is currently implemented by creating a "lock file", locking the file when a child accepts a connection, then unlocking it once the connection is accepted. Other children cannot accept the connection until the file is unlocked.

Depending on the operating system, the file is either locked using "fcntl" or "flock" system calls. This is controlled by the definition of either USE_FLOCK_SERIALIZED_ACCEPT or USE_FCNTL_SERIALIZED_ACCEPT in the conf.h file. This works on most operating systems and is reasonably efficient (provided the lock file is not located on an NFS mounted directory, where it probably will not work correctly anyway). But it can be made faster on certain operating systems by using other methods of implementing mutual exclusion.

A proposed development is to add the following methods:

  • POSIX "mutexes". This is an implementation of mutual exclusion as part of the multi-threading function calls defined by a POSIX standard. Operating systems with a full implementation of POSIX multithreading should work with this method. At present this appears to be Solaris 2 only.
  • System V semaphores. Semaphores provide a means of inter-process communications between processes on System V based systems.
  • On IRIX systems, another method of mutual exclusion is available called "uslocks". This is faster on multi-processor systems.

It is proposed to make Solaris 2 default to using POSIX threads mutexes, and for IRIX to use System V semaphores.

In addition to these new methods, some operating systems may be made faster by allowing multiple processes to go into the accept stage without bothering with locking. For some other operating systems this is okay when a single socket is being used, but does not work with multiple sockets (i.e. multiple Listens). These systems will be able to define a new constant to enable serialisation (i.e. locking) when multiple sockets are involved, but not bother with locking when using a single socket.

Windows Install Program

The distribution of Apache 1.3 for Windows will come complete with a proper installations program. This will allow a choice of components to install (binaries, documentation, source code, etc) and extract the files from a packed archive. It may also be able to customise the configuration files for the installed system.

Better mod_speling

The mod_speling module has been updated. This is an extra module (not part of the distribution) which can cope with some types of mistyped URLs. For example, if the user types the URL with the wrong capitalisation this module looks at the actual filenames and converts it to (presumably) the correct capitalisation. This update adds these new features:

  • Update the source to match 1.3 module API
  • Fix real typing errors such as a missing or extra character, transposed characters or a single mistyped character

It has not yet been decided if this module will be distributed with Apache. If not, it will be an additional module downloadable from the Apache site's contributed modules directory.

Sources Re-organised for Better Configure and Easier Module Addition

The source code of Apache has been re-organised. Previously all the source files and most modules were in the src directory. New modules could also be added to this directory. This made it large and difficult to manage. Now all the "core" Apache source code has been moved to src/core and the modules to src/modules/standard. The support directory has been moved to src/support. In addition, operating system directories have been created under src/os to enable better organised support for the three major platforms Apache runs on: Unix, Windows and OS/2.

The re-organisation has moved modules into directories under src/modules. For example, all the distributed modules are now in the src/modules/standard directory. Additional modules can either be given their own directory (such as the proxy module), or dropped into the src/modules/extra directory. As before when a module is added a line needs adding to src/Configuration. This is now slightly simpler since all that needs adding is a line starting AddModule following by the relative pathname of the module's .c or .o file. Previously this line also required the internal module structure name.

The src/Configure program has been updated to understand all the new file locations, and to make it easier for module authors to create archives of their modules (ready to drop into new directories under src/modules). In addition modules can now get things added to the compilation options such as extra defines or libraries, and can be distributed in binary form.

Control Script for Apache

A script to start, stop and restart Apache is under development. Most users are familiar with the command

  kill -USR1 `cat /usr/local/etc/httpd/logs/httpd.pid`

or similar, used to restart Apache. Other simple scripts can be developed to start Apache at boot-up, to send it an immediate restart (-HUP) and to stop the server when the system is being closed down. However for new users these tasks are not trivial. To make this easier for everyone, a single script is under development that can perform all these actions on Apache. This script is also compatible with the System V style init (used on Linux and other systems) so the script can be used as a start/stop script in the appropriate directory (e.g. /etc/rc.d/init.d linked from the run-level specific directory).

Apache in the News

IEEE Internet Computer has an article on Collaborate Work: The Apache HTTPD Server Project (PDF format file). This explains the history of the development process of Apache, and offers some ideas why a group of individuals would spend time contributing to the project. It is written by one of the main Apache developers, and also includes information about the technology used to support geographically dispersed collaborative development.

The NY Time's CyberTimes online issue contains the article called Maligning Free Software Is a Growing Web Tradition (13 August 1997, registration required). This explains that many people in commercial organisations cannot believe that free software is worth using, and they prefer to pay large sums of money for compilers, development environments and operating systems. Giving examples such as Perl, Apache and GNU software, the article concludes that "In the end, however, the developers who do the work know the truth. While clients may make us build their sites for with expensive software and systems, a lot of us go home at night to our little pet projects running on Linux boxes and using Apache with Java servlets and mySQL.".

Perhaps this next article should be called "Apache Not in the News". An article about browser and server market share called Netscape Maintains Market Share on MediaCentral claims that Netscape has 85% of the server market - based on "revenue". This is an interesting way to calculate market share, and of course Apache would not figure at all in the totals. But strangely they then give market share for "paid and unpaid" licenses: Microsoft 39%, Netscape 43%. Presumably the research on which this is based covered only servers developed by commercial organisations. The same research also claims that 50% of email servers are Netscape!