Giter Site home page Giter Site logo

mod_dup's Introduction

Description

This repository contain two modules apache, mod_dup and mod_compare which duplicate and compare HTTP requests respectively.

mod_dup

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

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

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.

Basic Request Migration

Basic Request Duplication with Migration

Duplication with Response

Documentation

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

Build

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

Dependencies

Build time

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)

Run time

apache2.2-common
libboost-thread1.40.0
libboost-regex1.40.0
libcurl3

mod_dup's People

Contributors

mlornac-orange avatar ccaraccio-orange avatar dgiampaglia-orange avatar cvallee-orange avatar jwustrack-orange avatar sandro-lex avatar ecourreges avatar vergnesol avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.