会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我们都是追梦人
博客园
首页
新随笔
联系
订阅
管理
2019年11月27日
动态切换负载均衡方式
摘要: set.lua 根据业务逻辑 返回nginx.conf里定义的负载均衡 upstream方式名称 return "upstream_server_hash" nginx.conf upstream upstream_server_hash { } upstream upstream_server_r
阅读全文
posted @ 2019-11-27 15:03 马户
阅读(411)
评论(0)
推荐(0)
2019年11月11日
consul 动态负载均衡
摘要: 下载 nginx-upsync-module wget https://github.com/weibocom/nginx-upsync-module/archive/v2.1.0.tar.gz 重新编译nginx --add-module=/root/sortware/nginx-upsync-m
阅读全文
posted @ 2019-11-11 13:24 马户
阅读(967)
评论(0)
推荐(0)
2019年11月7日
nginx 根据ip设置访问频率限制
摘要: #根据ip地址返回0,1,2等 本例0为白名单 上下文 http geo $rule_list { default 1; 127.0.0.1 1; 112.81.16.62 0; #include ip文件 } #如果不在条件之内返回二进制地址 上下文 http map $rule_list $li
阅读全文
posted @ 2019-11-07 15:37 马户
阅读(903)
评论(0)
推荐(0)
2019年8月19日
树状结构
摘要: function array2tree($data, $pId) { $tree = array(); foreach($data as $k => $v) { if ($v['father_id'] == $pId) { $v['child'] = array2tree($data, $v['or
阅读全文
posted @ 2019-08-19 17:01 马户
阅读(136)
评论(0)
推荐(0)
公告