satori-com / tcpkali

Fast multi-core TCP and WebSockets load generator.
Other
2.29k stars 199 forks source link

Payload generation #68

Closed joeppeeters closed 6 years ago

joeppeeters commented 6 years ago

I'm using the tcpkali to test the capabilities of our websocket service under high load. We run a binary protocol over the socket. The tool works fine, out of the box 👍. Though, currently we send the same message over and over, which causes our backend to start serving out cached results which skews our measurements.

I'm looking for a way to generate different payloads for each request. Is that something which is going to be supported? Or is there some alternative way I can achieve this?

vlm commented 6 years ago

Please read the manual page concerning dynamic regex-driven loads. For example, use --ws -em '\{re [0-9]{10}}' would generate a stream of random numbers.

joeppeeters commented 6 years ago

I know of the dynamic loads, but I don't see it working for binary messages. Please correct me if I'm wrong.

vlm commented 6 years ago

Would you please show the full command line?

joeppeeters commented 6 years ago

We currently do just a simpletcpkali --ws -m "\{ws.binary <payload>} localhost:8080.

The payload is a sample from a binary message we received. The plan is to sample a bunch (a few thousands) of incoming messages. If we then can load them somehow into the load tester to replay them at a certain rate that would be great.

What actually could work is as simple a being able to specify a folder and read all files in there. That is, if we can control the rate. Currently it seems the when you specify multiple messages they are all send at the same time.