1

I have developed an image processing web application and would like to run some load tests to get an idea how it will handle peak usage scenarios.

The application is asynchronous and to simplify things this is the current workflow:

The user logs in, uploads one or more jpeg file, makes choices of processing options (filters, rotation, splits, shapes coordinates extraction etc: all those params are set via ui and sent as part of the POST request to processing services) one service finishes its work, flags the file in a postgres db as ready for the next step so on so forth, some steps are final, and result in the user being notified to take further actions, some other steps are automatically picked up (kind of asynchronous tasks) so the system can carry on processing without user interaction.

My question, how would one approach load testing such asynchronous systems? Is looping to wait for a condition to happen a good practice in automated load testing ? Are there any load testing known best practices for such distributed and asynchronous systems? Any pitfalls to avoid ?

The load testing tool i’ve chosen is LocustIO as it is 100% code. But willing to reconsider others should any third party testing libs are required to accomplish this.

1 Answer 1

1

If the only way of getting the fact that the job is done is periodically checking the status in the database then "looping" is a viable solution.

Other options to check could be SSE or WebSockets.

The idea of the test is to simulate real user using the real browser so your load testing tool needs to be able to behave like a real browser in terms of handling embedded resources, cookies, cache, AJAX requests, etc. and the images processing completion event should be obtained using the way the real user receives it (I doubt that real users open Postgres client and run a SQL query to see whether the processing is complete or not)

1
  • Thanks for your input, indeed the final user is not going to check any internal or db params, this test i’m thinking about is supposed to “measure” http req/resp cycles. I’m also thinking of adding end to end performance testing for real world scenario using browsers to simulate user’s interaction as they’re supposed to use it. The only difficulty will be spinning many browsers (hundreds) either headed or headless but this is another story and would definitely not use locust as a load testing tool, but something like playwright or wdio
    – Y_59_alef
    Commented May 22 at 10:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.