6

Here is the link for a simple chat application with room concept which I'm referring to learn how to create socket.io applications - https://github.com/mcantelon/chatrooms .

I need to test how much load this application takes for socket.io.

How can I test how many connections it serves successfully? Is there any tool or method to achieve this?

1
  • Have you looked at Jmeter or Gatling? Both free load testing tools with getting started documentation.
    – Sam Woods
    Commented Jan 6, 2015 at 18:16

2 Answers 2

4

Artillery is a load-testing tool with native Socket.io support out of the box (and is written in Node.js too).

Why is native Socket.io support important? WebSocket is only one of the underlying transport protocols that Socket.io can use and Socket.io layers its own protocol on top, so while it's possible to test a Socket.io server with something like the WebSocket Plugin for JMeter, it certainly won't be as easy to write your tests as when using something that speaks Socket.io "natively", and your tests won't be as realistic (for example, you will skip protocol negotiation and will be connecting straight to the WebSocket endpoint exposed by Socket.io).

(Disclosure: I am the lead developer of Artillery.)

2
  • 1
    You need to disclose your affiliation with Artillery.io in your answer, or it will be deleted as spam. Please edit your answer to note your association with the tool.
    – Kate Paulk
    Commented Sep 2, 2016 at 11:20
  • @hassy veldstra - Is it possible to make a "http get call" even before we start the socket.io engine? My scenario is that I need an Id from the http get call before the engine(in my case it is socket.io) starts. My problem is that I cannot make that http call after engine starts as it incurs other performance issues which are not acceptable.
    – Vah Run
    Commented Jan 23, 2020 at 15:02
3

Socket.IO uses WebSocket protocol so you need to look for a load testing tool capable of WebSocket testing.

As far as I'm aware there is a WebSocket Plugin for Apache JMeter which can be used to stress your chat application.

See WebSocket Testing With Apache JMeter guide for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.