Nginx limit模块限制并发数
http://hopestar.github.io/2013/06/08/nginx-limit-moule-note/vi /export/servers/nginx/conf/nginx.conf limit_zone one $binary_remote_addr 20m;limit_req_zone $binary_remote_addr zone=req_one:20m rate=12r/s; 2.添加limit_conn 和limit_req 这个变量可以在http, server, location使用 我是限制nginx上...
Nginx配置
http://seanlook.com/2015/05/17/nginx-location-rewrite/1. location正则写法一个示例:location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ]}location / { # 因为所有的地址都以 / 开头,所以这条规则将匹配到所有请求 # 但是正则和最长字符串...
jQuery的deferred对象详解
转载自:http://www.ruanyifeng.com/blog/2011/08/a_detailed_explanation_of_jquery_deferred_object.htmlhttps://www.zhihu.com/question/19805411
OpenResty负载均衡MySQL
OpenResty下载地址https://openresty.org/download/ngx_openresty-1.9.3.2.tar.gznginx_tcp_proxy_module模块需要单独下载https://github.com/yaoweibin/nginx_tcp_proxy_module首先,解压缩上述文件[nginx@localhost~]$ll总用量 3668drwxrwxr-x 7 nginx nginx 4096 8月 18 23:39 nginx_tcp_pro...
OpenResty最佳实践
转载自:https://www.gitbook.com/book/moonbingbing/openresty-best-practices/details
Lua学习笔记--面向对象(三)
Lua通过Self指针实现面向对象.对象其实是一个table,table不仅包括数据,还包括函数account={balance=10}function account.withdraw(self,v) self.balance=self.balance-vendlocal a=accountaccount=nila.withdraw(a,2)print(a.balance) self是每个函数...
Lua学习笔记--迭代器和协程(二)
迭代器function iterator(tab) local i=0 return function() i=i+1; return tab[i] ...
Lua学习笔记(一)
构造一个空的table,接收终端的输入a={}for i=1,5 do a[i]=io.read()end#a可以获取table a的最后一个元素的索引.遍历tablefor i=1,#a do print(a[i])end清空最后一个元素a[#a]=nil获取最后一个元素print(a[#a])追加元素a[#a+1]="edmond"选...
开始学习OpenResty
OpenResty下载地址https://openresty.org/download/ngx_openresty-1.9.3.2.tar.gzNginx增加模块需要重新编译.OpenResty 将很多常用的模块,包括LUA支持,cjson等,直接打包在一起.使用起来非常的方便.随手用的模块都有,也免去了重新编译的烦恼.安装:useradd -m nginx加压文件,创建目标文件夹OpenResty[nginx@localh...
源码安装Nginx
在15所工作的时候,用Apache反向代理几个Tomcat就觉得很高大上了。今天同事说这玩意早过时了。还好Apache我其实也不熟,一切从头来吧。源码下载地址:http://nginx.org/en/download.htmlhttp://nginx.org/download/nginx-1.6.2.tar.gz创建一个nginx用户,解压源码[root@slaveOne ~]# useradd -m nginx[root@slaveOne...
Fiddler工具
http://www.cnblogs.com/TankXiao/archive/2012/02/06/2337728.htmlFiddler类似于Chrome的开发者工具,他是免费试用的。
学习Javascript闭包
参考:http://www.ruanyifeng.com/blog/2009/08/learning_javascript_closures.html
客户端序列化JSON对象
平时常用的都是SpringMVC将JAVA对象序列化为JSON,然后传输到前端UI。前端UI传输数据到后台,一般都是通过表单。现在可以通过json.stringify,将前端的对象直接序列化为JSON字符串传递到后台了。习惯了这种方式,表单很快就要彻底进入历史了..JSON.stringify的使用方式 var studen...
Get和Post请求详解
1.请求长度 RFC对于Get和Post请求并没有长度的限制。 但是浏览器有限制,比如IE浏览器Get请求不能超过2083个字符,而火狐浏览器不能超过65536个字符。浏览器对于Post请求则没有限制。 &n...