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.