0

The goal is to simulate a message queue (Pup/Sub).

TaskSets:

  • A TaskSet has users which add messages to a message queue (global variable here). The higher the CCU, the more messages get added to the queue.
  • A second TaskSet has user which directly calls the service to GET information. This does not happen as much and thus have a smaller weight (about 30%).

The message queue simulation:

  • A POST happens about 16 times per second to send the oldest X messages from the message queue (the global variable).
  • The POST pace should stay close to 16 messages per second, no matter the CCU, the CPU of the machines running locust or the number of machines used in a distributed locust.
  • If the service is slow to respond, it should not affect the pace of the 16 POST per second.
  • It does not matter if the POST all come from a single machine or multiple machines.
  • The POST related statistics (latency, RPS, Success, Failures, etc.) should be part of the locust report/dashboard like any other calls.

Additional information: The users which only add messages to a global queue variable represent a Pup/Sub mechanism where an external message queue gets filled with messages related to user actions from other services. Those users do not directly call the service, they only add messages in a global queue variable, which will be sent to the service at a fixed rate (unless the queue is empty, then no message will be sent). Each POST will include a batch of messages up to a certain limit.

David Gourde
  • 3,709
  • 2
  • 31
  • 65
  • Hi! Said maintainer of locust/locust-plugins here :) I'm trying to read your question, but it is just too long. Do you think you could narrow it down to exactly what you are trying to do (is it just constant RPS?), and specify what you mean when you say it didnt work? If you're ok with just constant rps per Locust/User (as opposed to constant *total* rps) then this is the most reliable https://docs.locust.io/en/stable/api.html#locust.wait_time.constant_pacing – Cyberwiz May 23 '20 at 09:22
  • @Cyberwiz I removed my trials and errors and updated my question to be as clear as possible with bullet points. I separated any additional information into a separate section at the bottom. Thanks – David Gourde May 26 '20 at 12:37
  • Sorry, it still isnt very clear to me what you're trying to do. Do you mean to simulate a queue INSIDE locust? Anyways, have a look at constant_pacing https://docs.locust.io/en/stable/api.html#locust.wait_time.constant_pacing or its "global" cousin, constant_total_ips at https://github.com/SvenskaSpel/locust-plugins/blob/master/examples/constant_total_ips_ex.py – Cyberwiz May 27 '20 at 12:24

0 Answers0