Web socket frames are bidirectional messages between a server and client on an open connection. They are typically used for chat, pushing data, or collaborative applications. StresStimulus can record and playback these frames, just like any session.

Frame vs Session

A session is a request/response combination that StresStimulus records, and then plays back under load. In StresStimulus, a completed session sends a request and receives a corresponding response from the server.

A web socket frame is a message that either comes from client to server or from server to client. In contrast to a session, a frame does not expect a corresponding response message.

When replaying the frame, StresStimulus does the following:

  • Client to server frame: StresStimulus sends the payload to the server
  • Server to client frame: StresStimulus waits for a frame from the server

Web Socket Frame

During recording web socket frames, the following properties are captured:

  • Direction: Client to server or Server to client
  • Opcode: The frame Opcode (Text, Binary, Ping, Pong, Close Connection, Fragment)
  • Content: The frame body

Following runtime properties are configurable:

Delay (s)

The amount of time in seconds to wait after the next frame is processed

Timeout (s)

The maximum amount of time for sending or receiving a web socket frame. After the timeout period, the next frame will be processed. 

Web Socket Session

Every web socket connection handshake begins with a request/response combination, as described here. The handshaking session is called a Web Socket Session.

The Delay and Timeout property are configured for all child frames.

Concurrency Mode

Most of the time, web socket frames occur asynchronously; therefore it is recommended to set the Concurrency mode to Asynchronous

  • No labels