This repository contain two modules apache, mod_dup and mod_compare which duplicate and compare HTTP requests respectively.
mod_dup duplicates Apache requests (POST, GET or both). Only requests which match specified filters are duplicated. Before duplication, all defined substitutions are applied to the incoming request. To minimize resource usage, mod_dup adapts to the amount of incoming by adjusting its number of threads. If maximum thresholds are reached, requests are dropped. In other words, mod_dup is built to guarantee a low system impact by sacrifizing the reliability of duplications. However, by using a high number of maximum threads, request dropping can be avoided and system impact raised. mod_dup periodically emits log messages containing metrics such as the number of dropped requests.
mod_compare allows to compare the response header and body of HTTP Requests between two web services. mod_compare receives an http request which contains the response header and body of a Web Service that will be compared to the response of the web service installed in the same server of mod_compare. In order to work fine, the input request must contain the following header:
- Duplication Type: Response and must respect the "dup format":
- URL --> the URL of orifinal request
- BODY --> XXXXXXXX{request_body}XXXXXXXX{response_header}XXXXXXXX{response_body} The first 8 characters indicate the size of the request body. Then the request body, 8 characters for the size of the response header, the response header, 8 characters for the size of the response body and the response body. Two operating modes are possible:
- Response Comparison
- No Comparison
WARNING: The Web Services must not be CGI based scripts.
mod_migrate migrates Apache requests (POST, GET or both). Only requests which match specified filters are migrated. This mod uses mod_rewrite and mod_proxy to redirect the requests.
To generate the technical documentation of the code using doxygen, see documentation in the Build section.
For usage and configuration documentation, read the module Wiki at this page https://github.com/Orange-OpenSource/mod_dup/wiki
First create and go into a build directory:
mkdir build
cd build
then run cmake & make:
cmake ..
make
or with unit tests:
cmake -DBUILD_UNIT_TESTS=ON ..
make test
CTEST_OUTPUT_ON_FAILURE=1 make test
or with coverage:
cmake -DBUILD_COVERAGE=ON ..
make coverage-unit (or make coverage-functional, make coverage-functional-compare, make coverage-compaign)
CTEST_OUTPUT_ON_FAILURE=1 make test
<browser> measures/coverage/html/index.html
or to generate documentation:
cmake ..
make doc
<browser> docs/doxygen/html/index.html
cmake
libcurl4-openssl-dev
libboost-thread-dev
libboost-regex1.40-dev
libboost-dev
libapr1-dev
libaprutil1-dev
apache2-threaded-dev OR apache2-prefork-dev
gcc (>= 4.4.3)
apache2.2-common
libboost-thread1.40.0
libboost-regex1.40.0
libcurl3