Giter Site home page Giter Site logo

zhangjingpu / nginx-tcp-lua-module Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laozi2/nginx-stream-lua-module

0.0 2.0 0.0 1.16 MB

nginx tcp lua

License: BSD 2-Clause "Simplified" License

Makefile 0.01% C++ 0.49% Nginx 0.20% Perl 0.16% HTML 0.03% Shell 0.02% C 96.98% XS 0.50% Objective-C 0.03% Assembly 0.02% Lua 1.57%

nginx-tcp-lua-module's Introduction

基于nginx1.4.1开发。
1. 日志: 新增 error_log, access_log 的网络日志功能。
2. tcp 模块。 
	tcp框架下自定义协议开发,模块示例 demo 
3. 基于tcp框架的tcp_lua模块。参照 https://github.com/bigplum/nginx-tcp-lua-module
	在基本代码框架上做调整:
	3.1 将整个ngx_tcp_lua作为一个独立模块,而非整个tcp模块围绕tcp_lua模块开发。
	3.2 鉴于一个连接上仅有一个客户端,将封装的socket上下游通用类分离出下游函数。socket类仅与上游交互。简化逻辑。
	3.3 为提高效率,lua处理请求分为 连接会话和协议请求。充分利用keepalive。 具体参照文档和实现。
	3.4 去掉接收数据时的模式匹配功能函数receiveutil,简化接收发送缓存的实现,使得对内存的控制更精确,内存资源管理更简单。
	3.5 扩充init_by_lua功能和共享内存操作功能, ngx.sleep,ngx.exit等函数。
	3.6 优化代码和修复已知bug.
	3.7 支持使用mysql,http协议与上游交互,并支持简单的负载均衡和重试机制
	3.8 实现ngx.nlog代替ngx.log打印网络日志
4. 详细说明见 src/tcp/doc/ 相关文档

nginx-tcp-lua-module's People

Contributors

laozi2 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.