Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

benchmarking websocket server (hybi-17) node.js (0.6.7)

I am developing a webscoket server using node.js, and as I'm finishing up my core api, I want to start benchmarking my server and testing for memory leaks. The only benchmarking tool I found so far is wsbench, but the project is out of date and using depreciated api calls. I've found some other out of date posts on the answer or solutions that won't work based on platform, (I'm using OS X). I'm really looking for some more up-to-date solutions to this problem, rather than stuff from a year ago.

like image 791
Eric Pigeon Avatar asked Dec 12 '22 06:12

Eric Pigeon


1 Answers

The Autobahn testing suite is a great place to start. Its 9.x tests provide good coverage of performance at different message sizes, fragment sizes, tcp packet sizes, and round trip time for both client and server implementations. Keep in mind, Autobahn is written in python and as such has a reduced ability to provide accurate metrics as your implementation approaches the speed of the test client/server itself.

To help provide better performance metrics for implimentations written in faster languages than Python I am working on implementing many of the Autobahn 9.x tests using my C++ WebSocket++ library. WebSocket++ also includes a generic stress testing client to allow server authors to test what happens to their servers with thousands of connections.

Both Autobahn and WebSocket++ fully support the final RFC6455 WebSocket specification released in November 2011. WebSockets are relatively new technology and the testing tools for them are not fully mature yet. If you have any questions or feedback about WebSocket performance testing feel free to contact me privately or post issues to either Github project.

Disclaimer: I am the author of WebSocket++ and a contributor to the Autobahn test suite.

like image 87
zaphoyd Avatar answered Dec 14 '22 22:12

zaphoyd