OpenResty 1.5.8.1 发布,Nginx 应用服务器

oschina
 oschina
发布于 2014年01月12日
收藏 17

OpenResty (也称为 ngx_openresty)是一个全功能的 Web 应用服务器。它打包了标准的 Nginx 核心,很多的常用的第三方模块,以及它们的大多数依赖项。

OpenResty 1.5.8.1 发布了,改进记录包括:

  • change: now we default to LuaJIT instead of the standard Lua 5.1 interpreter. the --with-luajit option for ./configure is now the default. To use the standard Lua 5.1 interpreter, specify the --with-lua51 option explicitly.

  • bugfix: Nginx's built-in resolver did not accept fully qualified domain names (with a trailing dot).

  • optimize: shortened the Server response header string "ngx_openresty" to "openresty".

  • upgraded the Nginx core to 1.5.8.

  • upgraded LuaJIT to v2.1-20140109.

    • bugfix: fixed ABC (Array Bounds Check) elimination. (Mike Pall)

    • bugfix: fixed MinGW build. (Mike Pall)

    • bugfix: x86: fixed stack slot counting for IR_CALLA (affects table.new). (Mike Pall) this could lead to random table field missing issues in LuaRestyMySQLLibrary on i386. thanks lhmwzy for the report.

    • bugfix: fixed compilation of string.byte(s, nil, n). (Mike Pall)

    • bugfix: MIPS: Cosmetic fix for interpreter. (Mike Pall)

  • upgraded LuaNginxModule to 0.9.4.

    • feature: allow use of ngx.exit() in the context of header_filter_by_lua* to perform a "filter finalization". but in this context ngx.exit() is an asynchronous operation and returns immediately.

    • feature: added the optional 5th argument, "res_table", to ngx.re.match() which is the user-supplied result table for the resulting captures. This feature can give 12%+ speedup for simple ngx.re.match() calls with 4 submatch captures.

    • feature: ngx.escape_uri() and ngx.unescape_uri() now accept a nil argument, which is equivalent to an empty string.

    • feature: added new pure C API, ngx_http_lua_ffi_max_regex_cache_size, for FFI-based implementations like LuaRestyCoreLibrary.

    • change: ngx.decode_base64() now only accepts string arguments.

    • bugfix: coroutines might incorrectly enter the "dead" state even right after creation with coroutine.create(). thanks James Hurst for the report.

    • bugfix: segmentation fault might happen when aborting a "light thread" pending on downstream cosocket writes. thanks Aviram Cohen for the report.

    • bugfix: we might try sending the response header again in ngx.exit() when the header was already sent.

    • bugfix: subrequests initiated by ngx.location.capture() might send their own response headers more than once. this issue might also lead to the alert message "header already sent" and request aborts when nginx 1.5.4+ was used.

    • bugfix: fixed incompatibilities in Nginx 1.5.8 which breaks the resolver API in the Nginx core.

    • bugfix: fixed a compilation warning when PCRE is disabled in the build. thanks Jay for the patch.

    • bugfix: we did not set the shortcut fields in r->headers_in for request headers in our subrequests created by ngx.location.capture*(), which might cause inter-operative issues with other Nginx modules. thanks Aviram Cohen for the original patch.

    • optimize: we no longer clear the lua_State pointers for dead "light threads" such that their coroutine context structs could be reused by other "light threads" and user coroutines. this can lead to smaller memory footprint.

    • doc: documented that the coroutine.* API can be used in init_by_lua* since 0.9.2. thanks Ruoshan Huang for the reminder.

  • upgraded LuaRestyMemcachedLibrary to 0.13.

    • optimize: saved one cosocket receive() call in the get() and gets() methods.

    • bugfix: the Memcached connection might enter a bad state when read timeout happens because LuaNginxModule's cosocket reading calls no longer automatically close the connection in this case. thanks Dane Knecht for the report.

  • upgraded LuaRestyRedisLibrary to 0.18.

    • optimize: eliminated one (potentially expensive) string.sub() call in the Redis reply parser.

    • bugfix: the Redis connection might enter a bad state when read timeout happens because LuaNginxModule's cosocket reading calls no longer automatically close the connection in this case.

  • upgraded LuaRestyLockLibrary to 0.02.

    • bugfix: the lock() method accepted nil keys silently.

  • upgraded LuaRestyDNSLibrary to 0.11.

    • bugfix: avoided use of the module() built-in to define the Lua module.

    • bugfix: we did not reject bad domain names with a leading dot. thanks Dane Knecht for the report.

    • bugfix: error handling fixes in the query and tcp_query methods.

  • upgraded LuaRestyCoreLibrary to 0.0.3.

  • upgraded EchoNginxModule to 0.51.

    • bugfix: for Nginx 1.2.6+ and 1.3.9+, the main request reference count might go out of sync when Nginx's request body reader returned status code 300+. thanks Hungpu DU for the report.

    • bugfix: echo_request_body truncated the response body prematurely when the request body was in memory (because the request reader sets "last_buf" in this case). thanks Hungpu DU for the original patch.

    • bugfix: using $echo_timer_elapsed variable alone in the configuration caused segmentation faults. thanks Hungpu DU for the report.

    • doc: typo fix in the echo_foreach_split sample code. thanks Hungpu DU for the report.

  • upgraded DrizzleNginxModule to 0.1.7.

    • bugfix: fixed most of warnings and errors from the Microsoft Visual C++ compiler, reported by Edwin Cleton.

  • upgraded HeadersMoreNginxModule to 0.25.

    • bugfix: fixed a warning from the Microsoft C compiler. thanks Edwin Cleton for the report.

    • doc: documented the limitation that we cannot remove the "Connection" response header with this module. thanks Michael Orlando for bringing this up.

  • upgraded SetMiscNginxModule to 0.24.

    • bugfix: fixed the warnings from the Microsoft C compiler. thanks Edwin Cleton for the report.

  • upgraded SrcacheNginxModule to 0.25.

    • feature: now the value specified in srcache_store_skip is evaluated and tested again right after the end of the response body data stream is seen. thanks Eldar Zaitov for the patch.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 OSCHINA 社区 [http://www.oschina.net]
本文标题:OpenResty 1.5.8.1 发布,Nginx 应用服务器
加载中

最新评论(3

eechen
eechen
OpenResty不是Nginx分支,OpenResty紧跟Nginx官方稳定版的脚本,OpenResty主要维护Nginx_Lua相关模块,而且把Nginx、Nginx_Lua、LuaJIT整合在一起发布。

OpenResty不是要取代PHP,OpenResty可以像Nginx一样和PHP-FPM、HHVM配合使用,好处是OpenResty支持Lua编程,在Nginx层面实现更多高级功能(比如开发REST数据接口),而且还能保有Nginx的高性能的优势。

淘宝量子统计(数据接口层/网络中间层)就使用了Nginx/Lua:
http://developer.51cto.com/art/201207/350070.htm
eechen
eechen
配置指令/API等信息:
https://github.com/chaoslawful/lua-nginx-module
http://wiki.nginx.org/HttpLuaModule
Nginx中文教程:
http://openresty.org/cn/#eBooks
https://github.com/agentzh/nginx-tutorials/
论坛:
https://groups.google.com/forum/#!forum/openresty
Lua5.1参考手册:
http://www.codingnow.com/2000/download/lua_manual.html
开发工具LDT:
http://www.eclipse.org/koneki/ldt/
演讲:由Lua粘合的Nginx生态环境
http://blog.zoomquiet.org/pyblosxom/oss/openresty-intro-2012-03-06-01-13.html
eechen
eechen
OpenResty作者在AWS上做的操作MySQL的测试
OpenResty vs Node.js vs PHP-FPM:
http://www.cnbeta.com/articles/181315.htm

关于IIS、Jexus、Node.js、OpenResty的简单测试
http://www.cnblogs.com/nzai/archive/2013/04/08/3006573.html
环境: i3-2100 4G内存 Ubuntu/Windows7双系统(均为32位) 同时运行Web服务器和MySQL数据库
静态文件处理能力: OpenResty = 14倍IIS (OpenResty承载42464个连接,IIS仅为2953)
MySQL查询: OpenResty = 6倍IIS/ASP.Net (OpenResty承载了12694个连接,IIS仅为2047)

ngx_openresty/lua和node.js以及php-fpm的Hello World压力测试:
http://bluehua.org/demo/php.node.lua.html
OpenResty优势:低系统负载,低内存占用,更大的网络吞吐量.
返回顶部
顶部