Small module for nginx that will avoid retrying failed POST requests as they are not idempotent
C Shell
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit ahead, 2 commits behind xetorthio:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
README.md
config
ngx_http_upstream_idempotent_module.c
test.sh

README.md

Nginx Upstream Idempotent

Description

The Nginx idempotent module will avoid retrying with POST requests.

Installation

You'll need to re-compile Nginx from source to include this module. Modify your compile of Nginx by adding the following directive (modified to suit your path of course):

./configure --with-http_ssl_module --add-module=/absolute/path/to/nginx-upstream-idempotent
make
make install

Usage

Change your Nginx config file's upstream block to include the 'fair' directive:

upstream something {
    only_retry_idempotent;

    server 127.0.0.1:5000;
    server 127.0.0.1:5001;
    server 127.0.0.1:5002;
}

If you encounter any issues, please report them using the bugtracker

Contributing

Please feel free to fork the project at GitHub and submit pull requests or patches.