Load Testing socket.io Web Applications and Infrastructure

Tutorial for load testing your socket.io WebSockets server

Are you shipping a scalable real-time back end? This article provides a tutorial for load testing your socket.io based WebSocket server, to simulate production load and identify performance bottlenecks or scalability issues.

socket.io is a framework built on top of the WebSocket protocol, which upgrades an HTTP connection using an Upgrade: websocket header, initiating a WebSocket handshake.

This provides a persistent connection between a client and server where both parties can emit messages at any time, without the need for the client to poll the server.

socket.io adds additional functionality on top of this, such as increasing browser and device support of your application by providing an option to fall back to Ajax requests when using a client which does not support WebSockets, or a client on a network which restricts the upgrade HTTP header or protocol changes.