You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Tsung HTTP sessions to load test SSE endpoints of my Web application. At the moment, there seems to be no support for SSE sessions in Tsung, so, I do a "normal" HTTP GET to an SSE endpoint, and keep Tsung users stuck with open connections. So far, it was sufficient for my current needs, but I started getting Tsung memory issues with matchers.
Tsung version
$ $HOME/.asdf/bin/tsung -v
Tsung version 1.7.1_dev
Issue
When doing an HTTP GET to an endpoint with endless response like this:
I expect, given that status code arrives before the endless payload, that this matcher does not look for anything else besides the first line of an HTTP response.
I also expected Tsung to have some buffering of HTTP responses, such that it might deliver response data in chunks to the matcher, and not to keep loading the entire response forever. For example, curl http://localhost:4001/stream (example server code is attached) does not show such behavior of growing memory.
How to reproduce
I attached an archive with example SSE server and two Tsung scripts for reproducing this locally.
I would also appreciate general suggestions regarding the approaches of using Tsung for my use case. I admit that using HTTP session is not ideal, there might be better ways to test SSE endpoints.
Thank you in advance.
The text was updated successfully, but these errors were encountered:
I am also wondering a bit how to deal with SSE, as that is the main data transport channel for our SPA. If you ever publish more about your approach it would be great if you could add a pingback here (subscribing to this issue for now).
Hello!
I use Tsung HTTP sessions to load test SSE endpoints of my Web application. At the moment, there seems to be no support for SSE sessions in Tsung, so, I do a "normal" HTTP
GET
to an SSE endpoint, and keep Tsung users stuck with open connections. So far, it was sufficient for my current needs, but I started getting Tsung memory issues with matchers.Tsung version
Issue
When doing an HTTP
GET
to an endpoint with endless response like this:Tsung memory is stable
But things change as soon as I add a matcher
Tsung memory is always growing
Expected behavior
When I do this:
I expect, given that status code arrives before the endless payload, that this matcher does not look for anything else besides the first line of an HTTP response.
I also expected Tsung to have some buffering of HTTP responses, such that it might deliver response data in chunks to the matcher, and not to keep loading the entire response forever. For example,
curl http://localhost:4001/stream
(example server code is attached) does not show such behavior of growing memory.How to reproduce
I attached an archive with example SSE server and two Tsung scripts for reproducing this locally.
sse-example-server.tar.gz
I would also appreciate general suggestions regarding the approaches of using Tsung for my use case. I admit that using HTTP session is not ideal, there might be better ways to test SSE endpoints.
Thank you in advance.
The text was updated successfully, but these errors were encountered: