Giter Site home page Giter Site logo

enhanced-limit-conn-nginx-module's Introduction

Enhanced-limit-conn-nginx-module

This is an enhanced limit conn nginx module with sysguard ability.

##Feature

  1. Combined sysguard module from Tengine.
  2. Enable to configure in main block.
  3. No bad effect on the origin limit conn function.
  4. Totally compatible with Nginx.

##Notice

  1. Replace ngx_http_limit_conn_module with ngx_http_enhanced_limit_conn_module directly.
  2. Without sysguard on, this module will act the same as ngx_http_limit_conn_module.
  3. With sysguard on, this module will limit connections unless this system running nginx is overload.

##Configuration

limit_conn_zone $binary_remote_addr zone=addr:10m;
limit_conn addr 50;

sysguard on;
sysguard_load load=8;
sysguard_mem swapratio=20%;
sysguard_mem free=100M;

##Directives

###limit_conn_zone 同limit_conn模块一致

###limit_conn 同limit_conn模块一致

###sysguard syntax: sysguard on | off

default: sysguard on

context: http, server, location, location if

开始系统状态监控功能,当超过所设置的阀值,则将limit_conn的限制连接数减半,以应对HTTP DOS攻击。

###sysguard_load syntax: sysguard_load load=[0-10];

default: sysguard_load load=8

context: http, server, location, location if

设置系统CPU负载阀值

###sysguard_mem syntax: sysguard_mem swapratio=[0-100]%; sysguard_mem free=[0-1000]M;

default: sysguard_mem swapratio=20%; sysguard_mem free=100M;

context: http, server, location, location if

设置系统内存阀值

##Contact me Email: [email protected]

enhanced-limit-conn-nginx-module's People

Contributors

hnlq715 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

enhanced-limit-conn-nginx-module's Issues

Simple limit config

hello sir,
what will be an ideal config for limiting speed for max 8 threads for download managers and speed not more than 4MB/s ?
please understand that i don't want to limit ip, I just want to limit every URL that will be downloaded.

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.