1

I am trying to use locust to simulate “normal” traffic behavior pattern.

This requires that the number of users (and not only the number of requests) to be none constant, for example, as a factor of the hour and day of week.

The simplest solution is to be able to set num_clients dynamically and the more complex solution, but better in my case, is to set each user a session length (constant or by some probabilistic distribution) or a chance to “disconnect” at the end of each request and on the other side a “stream” of users are spawned in a dynamically set rate.

I saw http://uu.diva-portal.org/smash/get/diva2:685934/FULLTEXT01.pdf and it seems that much of what was described there is already in the latest version, so I have the feeling that the changes are accomplishable without major changes to the package.

What is the best way to accomplish this task?

Thanks

Maydan
  • 11
  • 2

1 Answers1

0

The ramping feature of Locust, which that bachelor thesis refers to, was experimental and is no longer present in the latest version.

Locust is not designed to do what you're asking. Instead the purpose is be able to simulate user behaviour and determine the maximum simultaneous users that a system can handle.

What I'm wondering is if you really need to do what you are asking for? Because if you can determine that your system can handle a certain load - let's say for example 1000 simultaneous users - wouldn't you then also know that it would be able to handle 300 simultaneous users during times when there's less load?

heyman
  • 4,845
  • 3
  • 26
  • 19