Quantcast
Channel: OSCHINA 社区最新新闻
Viewing all articles
Browse latest Browse all 44787

uWebSockets 0.10.0,可扩展的WebSocket服务器库

$
0
0

uWebSockets 0.10.0 发布了,v0.10.0是一个完全重写的库,包括性能提升和bug修复。uWebSockets,是一款高度可拓展的最轻量级、效率最高的WebSocket服务器库之一。它具有易于使用的,完全异步面向对象的接口和与其他竞品对比扩展到数百万连接只使用一小部分内存的特点。详细更新如下:

性能和可伸缩性优化:

  • Node.js:

    • Greatly improved memory scalability. One million connections require 1.3 GB of user space memory - 65% of what v0.9.0 required and 8% of what ws 1.1.0 requires.

    • Slight throughput performance gain (up to 27x faster than ws 1.1.0, up from 24x with v0.9.0).

    • New optional (subject-to-change) low-level C-like interface exposed as require('uws').native - for those who don't mind trading a bit of productivity for improved efficiency.

  • Node.js and/or C++

    • Throughput has been improved ~20% despite the increased level of abstraction (up to 5 million messages echoed per second using the C++ interface and one Intel i5 CPU core).

    • Permessage-deflate requires way less memory per connection (1 byte) due to shared z_stream by default.

新特性:

  • Node.js and C++

    • Client support - thanks to @jimmyt857 for work on the early prototype!

    • Basic subprotocol support (it will simply accept any subprotocol).

  • C++

    • Greatly improved code quality.

    • Plenty of automatic test cases have been added, all passing cleanly under Valgrind.

    • Simplified threading, transfer connections between CPU cores "dynamically" during the connection lifetime.

    • SO_REUSEPORT support (goes well together with connection transferring).

    • Path routing (GET /whateverPath).

    • Concept of groups, one group share callbacks and broadcast scope.

    • New interface allows more complex set-ups (one group can listen to many ports, be it SSL or non-SSL or both)

Bug 修复:

  • Adds proper bounds checking to UTF-8 check.

  • Fixes a potential bug with short writes over SSL connections.

  • Proper SSL renegotiation support (SSL_read might need to write, etc).

  • IPv6 & IPv4 support.

发行说明:

下载地址:


Viewing all articles
Browse latest Browse all 44787

Trending Articles