当前位置

网站首页> 程序设计 > 开源项目 > 编程语言 > 浏览文章

nginx-http-sysguard

作者:小梦 来源: 网络 时间: 2024-03-14 阅读:

阿里百川梦想创业大赛,500万创投寻找最赞的APP

nginx-http-sysguard 是阿里巴巴开发的一个 Nginx 模块,用来保护运行 Nginx 服务器的系统负载和内存使用不会太高。

配置方法:

server {    sysguard on;    sysguard_load load=10.5 action=/loadlimit;    sysguard_mem swapratio=20% action=/swaplimit;    location /loadlimit {        return 503;    }    location /swaplimit {        return 503;    }}

安装:

$ wget http://www.nginx.org/download/nginx-1.2.5.tar.gz$ tar xzvf nginx-1.2.5.tar.gz$ cd nginx-1.2.5$ git clone https://github.com/taobao/nginx-http-sysguard.git$ patch -p1 < nginx-http-sysguard/nginx_sysguard_1.2.5.patch$ ./configure --add-module=./nginx-http-sysguard# make && make install

相关阅读

热点阅读

网友最爱