我个人的Nginx-1.12.2实践:安装,编译与测试(★firecat推荐,针对TCP四层负载均衡★)
一、Nginx
nginx news -- 开源版
Index of /download/ -- 开源版源码下载
Advanced Load Balancer, Web Server, & Reverse Proxy - NGINX -- 商业版
nginx documentation -- 官方文档
NGINX 3rd Party Modules | NGINX -- NGINX 3rd Party Modules
GoAccess - Visual Web Log Analyzer -- nginx日志分析工具
The Tengine Web Server -- 阿里巴巴根据nginx修改
二、Lua
Lua IDE - ZeroBrane Studio_libaineu2004的博客-CSDN博客 -- IDE
https://studio.zerobrane.com/doc-luajit-debugging
http://notebook.kulchenko.com/zerobrane/debugging-openresty-nginx-lua-scripts-with-zerobrane-studio
使用 tolua 实现 lua 与 c++ 交互
https://github.com/LuaDist/tolua
https://github.com/LuaDist/toluapp
QtLua library
https://www.nongnu.org/libqtlua/
https://savannah.nongnu.org/projects/libqtlua
三、Openresty
OpenResty® - 中文官方站 -- 开源版
OpenResty Inc. -- 商业版
https://github.com/openresty -- github
agentzh_新浪博客 -- 创始人,章亦春blog
https://github.com/agentzh-- 创始人,章亦春gitHub
OpenResty 最佳实践
http://wiki.jikexueyuan.com/project/openresty/
序 · OpenResty最佳实践
GitBook - Where software teams break knowledge silos.
https://github.com/moonbingbing/openresty-best-practices
GitBook - Where software teams break knowledge silos.
跟我学Nginx+Lua开发 --- 《亿级流量网站架构核心技术》作者,http://jinnianshilongnian.iteye.com/category/333854
四、Nginx源码学习
https://github.com/chronolaw/annotated_nginx -- 罗剑锋,带注释的nginx
https://github.com/chronolaw/annotated_nginx/blob/master/diagrams/readme.md -- UML
https://github.com/jianfengye/nginx-1.0.14_comment
https://github.com/its-tech/nginx-1.14.0-research
个人笔记 -- 陶辉,《深入理解Nginx:模块开发与架构解析(第2版)》作者
陶辉的博客_CSDN博客-技术分享,linux,C/C++领域博主 -- 陶辉,《深入理解Nginx:模块开发与架构解析(第2版)》作者
五、基于openresty 的几个开发框架
1. kong
api gateway
Github: https://github.com/Mashape/kong
2. Lapis
web 开发框架
Github: https://github.com/leafo/lapis
3. Vanilla香草
web 开发框架,Vanilla是一个基于OpenResty开发的高性能Web应用开发框架,Vanilla存在的意义在于降低基于OpenResty开发高性能后端服务的门槛,我们希望能探索一种快乐、便捷的高性能后端服务开发模式。Vanilla by idevz
Github: https://github.com/idevz/vanilla
4. Lor
web 开发框架 Lor framework
Lor是一个运行在OpenResty上的基于Lua编写的Web框架.路由采用Sinatra风格,结构清晰,易于编码和维护.API借鉴了Express的思路和设计,Node.js跨界开发者可以很快上手.支持多种路由,路由可分组,路由匹配支持正则模式.支持middleware机制,可在任意路由上挂载中间件.可作为HTTP API Server,也可用于构建传统的Web应用.
Github: https://github.com/sumory/lor
5. orange
api gateway。
https://github.com/orlabs/orange
Orange是一个基于OpenResty的API网关。除Nginx的基本功能外,它还可用于API监控、访问控制(鉴权、WAF)、流量筛选、访问限速、AB测试、动态分流等。它有以下特性:
提供了一套默认的Dashboard用于动态管理各种功能和配置
提供了API接口用于实现第三方服务(如个性化运维需求、第三方Dashboard等)
可根据规范编写自定义插件扩展Orange功能
Github: https://github.com/sumory/orange
https://github.com/orlabs/orange
6. nana
https://github.com/horan-geeker/nana
这是一个非常易用简单的 web api 框架,采取了一些较好的 php 框架的设计
主要目录结构分为 lib(公共方法),model(数据库相关),controller(由 nginx location 指向的 lua文件也就是控制器)
7. lua-resty-yii
https://github.com/hylun/lua-resty-yii
由于工作中主要是用到PHP进行开发,比较喜欢Yii2开发框架,于是动手自己参考YII实现了一个基于OpenResty的仿Yii的web框架
六、第三方模块
json,https://github.com/openresty/rds-json-nginx-module
mysql,https://github.com/openresty/drizzle-nginx-module
redis,https://github.com/openresty/redis2-nginx-module
MongoDB,https://github.com/bigplum/lua-resty-mongol
nginx安装mysql和json模块: 大前端影视
nginx安装redis模块: 大前端影视
七、竞品分析,lighttpd
https://github.com/lighttpd -- cmake
八、XMake
xmake: 轻量级跨平台C/C++构建工具,采用lua语法接口API描述项目,提供依赖检测、编译、打包、安装、运行、调试一条龙服务
https://github.com/xmake-io/xmake
----
http://tengine.taobao.org/
https://github.com/topcpporg/nginx_vs
Nginx开发从入门到精通
【nginx】关于Nginx的一些优化(突破十万并发)
修改 Nginx 进程最大可打开文件数(worker_processes和worker_connections)
Nginx反向代理支持长连接
Nginx + Keepalived 构建高可用的负载层
[root@localhost ~]# cd /usr/local/openresty
[root@localhost openresty]# bin/openresty -c hello.conf
[root@localhost openresty]# bin/openresty -s stop
[root@localhost openresty]# bin/openresty -v
nginx version: openresty/1.13.6.2