DSO or Dynamic Shared Object is a module that provides additional functionality to Apache HTTP Server.
Apache HTTP Server is a modular program where the administrator can choose the functionality to include in the server by selecting a set of modules. Modules will be compiled as DSOs that exist separately from the main httpd binary file. DSO modules may be compiled at the time the server is built, or they may be compiled and added at a later time using apxs.
apxs stands for APache eXtenSion. It is used for the creation of DSO files for Apache HTTP Server modules. It builds DSO based modules outside the Apache HTTP Server source tree.
DSO support for loading individual modules is based on a module mod_so.so which is statically compiled into the Apache HTTP Server. It is the only module besides core which cannot be put into a DSO itself. Practically all other distributed Apache HTTP Server modules will then be placed into a DSO. After a module is compiled into a DSO,we can use the LoadModule directive in httpd.conf file to load that module at server startup.
An alternative to DSO is Static modules. Here a module is statically compiled into the httpd binary when the server is built. This means, these modules will always be present while running httpd. They need not be loaded with LoadModule.
This is a compile-time choice. For this, during the configure process, we will have to use the configure option
--enable-mods-static instead of the option
Advantages of using DSO
- The server package is more flexible at run-time because the server process can be assembled at run-time via LoadModule. This way one is able to run different server instances (standard & SSL version, minimalistic & dynamic version [mod_php.so, mod_python.so], etc.) with only one Apache HTTP Server installation.
- The server package can be easily extended with third-party modules even after installation. This way different vendors can create an Apache HTTP Server core package and additional packages containing extensions like mod_mono.so, mod_parrot.so, mod_security.so etc.
- Easier Apache HTTP Server module prototyping, because with the DSO/apxs pair we can work outside the Apache HTTP Server source tree and bring a new version of our module into the running Apache HTTP Server.
Disadvantages of using DSO
- The server is approximately 20% slower at startup time because of the symbol resolving overhead the Unix loader now has to do.
- The server is approximately 5% slower at execution time under some platforms, because PIC or Position Independent Code sometimes needs complicated assembler tricks for relative addressing, which are not necessarily as fast as absolute addressing.
- Because DSO modules cannot be linked against other DSO-based libraries on all platforms we cannot use the DSO mechanism for all types of modules.
You may go back to the following section.
Installing Apache HTTP Server