Skip to content

fengpeiyuan/ngx_http_limit_req2_module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Name

ngx_http_limit_req2_module

This project is still experimental and under early development.

Description

ngx_http_limit_req2_module - another nginx limit request module which limit user total request only.

This module is a nginx http module, registerd in access and log phases, and store request' number in a specified shared memory zone. Each process share the 'limit_number/worker_processes' amount and control request amount individual, no lock yet.

This module is not distributed with the Nginx source. See the installation instructions.

Version

This document describes ngx_http_limit_req2_module released on 30 Dec 2015.

Synopsis

You can config bellow.

 http {
	...
	location /result {
    		 limit_number 10000;
	}

Installation

Grab the nginx source code from nginx.org, for example, the version 1.8.0, and then build the source with this module:

 wget 'http://nginx.org/download/nginx-1.8.0.tar.gz'
 tar -xzvf nginx-1.8.0.tar.gz
 cd nginx-1.8.0/

 # Here we assume you would install you nginx under /opt/nginx/.
 ./configure --prefix=/opt/nginx \
     --add-module=/path/to/ngx_http_limit_req2_module

 make
 make install

Download the latest version of the release tarball of this module

Authors

This wiki page is also maintained by the author himself, and everybody is encouraged to improve this page as well.

Copyright & License

Copyright (c) 2014-2015, Peiyuan Feng [email protected].

This module is licensed under the terms of the BSD license. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

another limit request module on amounts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages