Stress test tool for SocketStream #176

Open
nponeccop opened this Issue Mar 3, 2012 · 7 comments

5 participants

@nponeccop

I'm going to develop a stress test tool to test our app (and submit it as a pull request of course).

So any ideas and/or suggestions are welcome.

I'm looking at something in the lines of https://github.com/remy/Socket.io-node-client :

http://groups.google.com/group/socket_io/browse_thread/thread/e33e2c2e21783a4a?pli=1

@socketstream-owen

No plans to develop anything like this at present, so it would be great if you do. Thanks

@nponeccop

Here is early proof of concept code:

https://gist.github.com/2029434

I had to patch socket.io-client to add the handshakeHeaders option. The code creates 1000 clients in parallel. Each client sends app.init RPC which subscribes it to a channel depending on account subscription status.

Then every 15 seconds two events are broadcast using channels, so each of the 1000 clients receives only one.

1000 parallel RPCs and broadcasts to 1000 clients don't put much load on the server which is a good sign.

@owenb

Thanks @nponeccop

@dennismartensson has also been working on this problem and has posted a project here: https://github.com/dennismartensson/load_test

I have yet to fully dive into it, but I know it uses PhantomJS to spawn new headless browsers to test concurrency.

@paulbjensen

Wanted to know whether anything more is happening on this front? it's worth noting recent efforts with https://github.com/observing/thor and https://github.com/observing/balancerbattle.

@owenb

Yes, Thor is great! It came out very recently.

If you pass it a generator file you can simulate load on a SS server by sending it the same message an ss.rpc() produces.

Haven't got around to using it with SocketStream yet, but if you get chance, I'd love to see how it goes.

@paulbjensen

I had a brief look into this. I think that we'll need to upgrade SocketStream's version of engine.io as a first step, and then create a suitable generator file for the expected websocket messages.

@paulbjensen paulbjensen added this to the 0.3.12 milestone Feb 1, 2015
@thepian thepian modified the milestone: 0.4.x, 0.3.12 Mar 31, 2015
@thepian thepian modified the milestone: 0.3.14, 0.4.x Apr 16, 2015
@thepian thepian modified the milestone: 0.4.x, 0.3.14 Jul 18, 2015
@thepian thepian modified the milestone: 0.6 stable, 0.4.x Nov 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment