随笔分类 -  openresty

上一页 1 ··· 3 4 5 6 7

nginx 流量拷贝模块 ngx_http_mirror_module 安装试用
摘要:1. 下载源码编译 https://nginx.org/download/nginx-1.13.4.tar.gz 2. 下载依赖模块包 https://nginx.org/download/nginx-1.13.4.tar.gz 2. 下载依赖模块包 这里直接yum 安装 yum -y instal 阅读全文

posted @ 2017-08-14 09:47 荣锋亮 阅读(1784) 评论(0) 推荐(0) 编辑

ulimit  设置
摘要:1、 /etc/security/limit.conf * soft nofile 65535 * hard nofile 65535 * soft nproc 65535 * hard nproc 65535 * soft nofile 65535 * hard nofile 65535 * so 阅读全文

posted @ 2017-08-08 11:20 荣锋亮 阅读(497) 评论(0) 推荐(0) 编辑

nginx time_wait 较多优化
摘要:1. 查看命令 netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 结果 ESTABLISHED 22 FIN_WAIT1 2 FIN_WAIT2 11 TIME_WAIT 189 名词解释 netstat -n 阅读全文

posted @ 2017-08-08 11:09 荣锋亮 阅读(585) 评论(0) 推荐(0) 编辑

使用 openresty 修改请求内容
摘要:1. 目的 动态修改 html 页面内容 2. 使用方式 openresty 在 header_filter 阶段 以及body_filter 阶段进行数据修改 3. 源码 此方法是实现一个追加 js 到html 页面,同时将原有页面信息转为大写 location /{ root html; ind 阅读全文

posted @ 2017-07-07 10:56 荣锋亮 阅读(5553) 评论(0) 推荐(0) 编辑

转发 GSLB概要和实现原理
摘要:What is GSLB Global Server Load Balancing 中文:全局负载均衡 SLB(Server load balancing)是对集群内物理主机的负载均衡,而GSLB是对物理集群的负载均衡。这里的负载均衡可能不只是简单的流量均匀分配,而是会根据策略的不同实现不同场景的应 阅读全文

posted @ 2017-07-05 21:09 荣锋亮 阅读(1026) 评论(0) 推荐(0) 编辑

openresty 使用 log_by_lua 发送日志到 syslog-ng
摘要:1. 安装 opm get p0pr0ck5/lua-resty-logger-socket opm get p0pr0ck5/lua-resty-logger-socket 2. 使用 location lua_by_lua_block log_by_lua_block { local logge 阅读全文

posted @ 2017-06-19 22:36 荣锋亮 阅读(5732) 评论(0) 推荐(0) 编辑

基于openresty 的几个开发框架
摘要:1. kong api gateway Github: https://github.com/Mashape/kong 2. Lapis web 开发框架 Github: https://github.com/leafo/lapis 3. Vanilla web 开发框架 Github: https 阅读全文

posted @ 2017-06-19 08:29 荣锋亮 阅读(2727) 评论(0) 推荐(0) 编辑

openresty 几个插件使用
摘要:1. jwt opm get SkyLothar/lua-resty-jwt opm get SkyLothar/lua-resty-jwt 2. cookie opm get p0pr0ck5/lua-resty-cookie opm get p0pr0ck5/lua-resty-cookie 3 阅读全文

posted @ 2017-06-18 21:01 荣锋亮 阅读(3250) 评论(0) 推荐(0) 编辑

kong 了解
摘要:Kong 是在客户端和(微)服务间转发API通信的API网关,通过插件扩展功能。Kong 有两个主要组件: Kong Server :基于nginx 的服务器,用来接收 API 请求。 Apache Cassandra:用来存储操作数据。 你可以通过增加更多 Kong Server 机器对 Kong 阅读全文

posted @ 2017-06-18 12:55 荣锋亮 阅读(637) 评论(0) 推荐(0) 编辑

lua resty template && openresty 使用
摘要:1. 安装 luarocks install lua-resty-template 2. 使用 luarocks install lua-resty-template 2. 使用 配置模板页面位置 有多种方式: a. 直接使用root 目录 代码如下: location /{ root html; 阅读全文

posted @ 2017-04-04 21:41 荣锋亮 阅读(3513) 评论(0) 推荐(0) 编辑

openresty websocket 使用
摘要:openresty websocket 使用 1. 代码如下: local server =require"resty.websocket.server" local wb, err = server:new{ timeout =5000, max_payload_len =65535 } ifno 阅读全文

posted @ 2017-04-03 12:24 荣锋亮 阅读(2373) 评论(0) 推荐(0) 编辑

luarocks 安装
摘要:1. linux 安装 wget https://luarocks.org/releases/luarocks-2.4.1.tar.gz tar zxpf luarocks-2.4.1.tar.gz cd luarocks-2.4.1 ./configure; sudo make bootstrap 阅读全文

posted @ 2017-03-25 22:13 荣锋亮 阅读(3172) 评论(0) 推荐(0) 编辑

saas 系统租户自助网站
摘要:1. 原理 类似github 的自定义页面,使用jekyll 进行租户自助网站的生成,系统使用jenkins 进行租户的网站构建 同时结合租户的个性化域名系统,进行租户页面的发布管理 2. 实践操作 个性化域名不在赘述,jekyll 安装配置比较简单,使用gem 安装即可,但是可能存在版本的问题,可 阅读全文

posted @ 2017-03-25 16:22 荣锋亮 阅读(934) 评论(0) 推荐(0) 编辑

saas 系统租户个性化域名&&租户绑定自己域名的解决方案
摘要:实际的需求就类似github 的自定义page 1. 个性化域名 github 实现原理就是用户个性化域名使用泛域名解析,这个比较简单,大部分域名提供商都可以解决 具体操作不用赘述 使用nginx 的配置比较简单 openresty 配置如下: server { listen 8080default 阅读全文

posted @ 2017-03-22 23:05 荣锋亮 阅读(6112) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示