开源HTTP和反向代理服务器,Nginx 1.5.9 发布

jopen 10年前

nginx.gif
    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.9nginx/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.