DSO or Dynamic Shared Object

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 --enable-mods-shared.


Advantages of using DSO


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