Web Sockets are gaining
traction as a realtime full-duplex communication channel, with several
leading browsers (Chrome 5, Safari 5, Firefox 4, etc) having implemented
support for some flavor of the protocol. Server support exists, but is
not widespread, and is (entirely?) limited to specialized servers,
with Socket.IO (based on
NodeJS) being perhaps the most well-known.
Finally, there appear to be no tools to do load or other testing on Web
Socket services.

The error rate is tracked by wsbench and reported at the end.
Errors include failure to open a connection, failure to send a
message, failure to close the connection cleanly, etc.

The wsbench process running on a late-model MacBook is able to
generate this load using less than 10% of the CPU.

The above benchmarking run only tested establishing connections. We
didn't send (or receive) any messages. By passing the -m 5 and
-s 128 options to wsbench, we can send 5 128 byte messages per
connection. Invoke wsbench with the -h option to see full usage:

Beyond performance testing, it can be useful to run load against a
server continually to discover any resource leaks. This can be done by
passing the -c 0 option -- 0 connections is interpreted as a special
"infinite" value. For example -c 0 -r 100 will open/close 100
connections per second indefinitely (or until wsbench is terminated with
a ^C).

For information on how to script the core of wsbench, take a look at
the Session Scripting section in the project
page on GitHub. Because this tool is
written entirely in JavaScript (using NodeJS), you'll find that its
easily extensible using a familiar language.