Relative Content

Tag Archive for pythonpython-3.xperformance-testinglocuststress-testing

How to Limit Each User to a Fixed Number of Requests in a Locust Stress Test?

I’m currently designing a stress test for a mobile app API using Locust. The goal is to simulate realistic user behavior and stress the system within a one-hour test duration, with a maximum of 20,000 users. However, I need each simulated user to make only 30 requests before stopping.
How can I effectively limit each user to 30 requests within this stress test scenario using Locust? Are there any best practices or better ways to achieve this?

Why is the RPS Fluctuating Dramatically During Locust Stress Testing and Not Reaching the Server as Specified?

I’m using Locust for stress testing my application API, but I’m experiencing dramatic fluctuations in the Requests Per Second (RPS). for example, The RPS goes up to 2000 and then drops to 2 RPS in 2 seconds, which is not consistent with the expected behavior based on my code. Additionally, I checked the OCI logs and noticed that not all requests are reaching the server as specified in the code, resulting in inconsistent request handling.