Search code examples
socket.iojmeterbenchmarkingstress-testingjmeter-plugins

Socket.io 1.3.5 protocol and Jmeter benchmarking


I'm trying to benchmark socket.io 1.3.5 with Jmeter and the following websocket plugin (https://github.com/maciejzaleski/JMeter-WebSocketSampler).

When implementing the socket.io protocol in Jmeter to emulate the same connection steps I see in google dev tools I'm having a 20s delay between some frames. Please, can you give me some advice to get this working properly and remove this delay? Thank you!!

In Jmeter:

  1. HTTP REQUEST [GET] socket.io/?EIO=3&transport=polling&t=${timestamp} HTTP
  2. HTTP REQUEST [GET] socket.io/?EIO=3&transport=polling&t=${timestamp}&sid=${sessionid} HTTP
  3. WEBSOCKET REQUEST socket.io/?EIO=3&transport=websocket&t=${timestamp}&sid=${sessionid} WS REQUEST DATA: 2probe
  4. WEBSOCKET REQUEST socket.io/?EIO=3&transport=websocket&sid=${sessionid} REQUEST DATA: 5
  5. WEBSOCKET REQUEST socket.io/?EIO=3&transport=websocket&sid=${sessionid} REQUEST DATA: 42["auth", "test", "test", "test"]

In Node socket.io debug: screenshot -> http://postimg.org/image/5p08vszv3/


Solution

  • Since you don't continue to ping the server, ping timeout occurs and connection changes to xhr-polling, not socket connection any more. That's why it takes 20 seconds.