開源HTTP和反向代理服務器,Nginx 1.5.9 發布
nginx [engine x]是Igor Sysoev編寫的一個HTTP和反向代理服務器,另外它也可以作為郵件代理服務器。
它已經在眾多流量很大的俄羅斯網站上使用了很長時間,這些網站包括Yandex、Mail.Ru、VKontakte,以及Rambler。據Netcraft統計,在2012年8月份,世界上最繁忙的網站中有11.48%使用Nginx作為其服務器或者代理服務器。部分成功案例請見:
Netflix,
Wordpress.com,
FastMail.FM。
基本的HTTP服務器特性
- 處理靜態文件,索引文件以及自動索引;打開文件描述符緩存;
- 使用緩存加速反向代理;簡單負載均衡以及容錯;
- 遠程FastCGI,uwsgi,SCGI,和memcached服務的緩存加速支持;簡單的負載均衡以及容錯;
- 模塊化的架構。過濾器包括gzip壓縮、ranges支持、chunked響應、XSLT,SSI以及圖像縮放。在SSI 過濾器中,一個包含多個SSI的頁面,如果經由FastCGI或反向代理處理,可被并行處理;
- 支持SSL,TLS SNI。
其他的HTTP服務器特性
- 基于名字和IP的虛擬主機;
- Keep-alive和pipelined連接支持;
- 靈活的配置;
- 重新加載配置以及在線升級時,不需要中斷正在處理的請求;
- 自定義訪問日志格式,帶緩存的日志寫操作以及快速日志輪轉;
- 3xx-5xx錯誤代碼重定向;
- 重寫(rewrite)模塊:使用正則表達式改變URI;
- 根據客戶端地址執行不同的功能;
- 基于客戶端IP地址和HTTP基本認證機制的訪問控制;
- 支持驗證HTTP referer;
- 支持PUT、DELETE、MKCOL、COPY以及MOVE方法;
- 支持FLV流和MP4流;
- 速度限制;
- 來自同一地址的同時連接數或請求數限制;
- 嵌入Perl語言。
郵件代理服務器特性
- 使用外部HTTP認證服務器重定向用戶到IMAP/POP3后端;
- 使用外部HTTP認證服務器認證用戶后重定向連接到內部SMTP后端;
-
支持的認證方式:
- POP3: USER/PASS, APOP, AUTH LOGIN/PLAIN/CRAM-MD5;
- IMAP: LOGIN, AUTH LOGIN/PLAIN/CRAM-MD5;
- SMTP: AUTH LOGIN/PLAIN/CRAM-MD5;
- SSL支持;
- STARTTLS和STLS支持。
架構和擴展性
- 一個主進程和多個工作進程,工作進程以非特權用戶運行;
- 支持的事件機 制:kqueue(FreeBSD 4.1+)、epoll(Linux 2.6+)、rt signals(Linux 2.2.19+)、/dev/poll(Solaris 7 11/99+)、event ports(Solaris 10)、select以及poll;
- 眾多支持的kqueue特性包括EV_CLEAR、EV_DISABLE(臨時禁止事件)、NOTE_LOWAT、EV_EOF,可用數據的數量,錯誤代碼;
- 支持sendfile(FreeBSD 3.1+, Linux 2.2+, Mac OS X 10.5+)、sendfile64(Linux 2.4.21+)和sendfilev(Solaris 8 7/01+);
- 文件AIO(FreeBSD 4.3+, Linux 2.6.22+);
- DIRECTIO (FreeBSD 4.4+, Linux 2.4+, Solaris 2.6+, Mac OS X);
- 支持Accept-filters(FreeBSD 4.1+, NetBSD 5.0+)和 TCP_DEFER_ACCEPT(Linux 2.4+);
- 10000個非活躍的HTTP keep-alive連接僅占用約2.5M內存;
- 盡可能避免數據拷貝操作。
Nginx 1.5.9 發布了,下載地址:nginx-1.5.9 ,nginx/Windows-1.5.9
改進詳細內容:
*) Change: now nginx expects escaped URIs in "X-Accel-Redirect" headers.
*) Feature: the "ssl_buffer_size" directive.
*) Feature: the "limit_rate" directive can now be used to rate limit
responses sent in SPDY connections.
*) Feature: the "spdy_chunk_size" directive.
*) Feature: the "ssl_session_tickets" directive.
Thanks to Dirkjan Bussink.
*) Bugfix: the $ssl_session_id variable contained full session
serialized instead of just a session id.
Thanks to Ivan Risti?.
*) Bugfix: nginx incorrectly handled escaped "?" character in the
"include" SSI command.
*) Bugfix: the ngx_http_dav_module did not unescape destination URI of
the COPY and MOVE methods.
*) Bugfix: resolver did not understand domain names with a trailing dot.
Thanks to Yichun Zhang.
*) Bugfix: alerts "zero size buf in output" might appear in logs while
proxying; the bug had appeared in 1.3.9.
*) Bugfix: a segmentation fault might occur in a worker process if the
ngx_http_spdy_module was used.
*) Bugfix: proxied WebSocket connections might hang right after
handshake if the select, poll, or /dev/poll methods were used.
*) Bugfix: the "xclient" directive of the mail proxy module incorrectly
handled IPv6 client addresses.