Search code examples
locust

locust load testing appropiate Number of users to simulate and hatch rate


I am doing load testing using locust. I write a script and set up everything for load testing.

Only two points I do not understand actually,

What is the meaning of the below numbers? e.g

  1. Number of total users to simulate

  2. Hatch rate (users spawned/second)

What will be the appropriate value for these two options?


Solution

    1. The number of users: the number of users testing your application. Each user opens a TCP connection to your application and tests it.
    2. Hatch rate: For each second, how many users will be added to the current users until the total amount of users. Each hatch Locust calls the on_start function if you have.

    for example:

    • Number of users: 1000
    • Hatch rate: 10

    Each second 10 users added to current users starting from 0 so in 100 seconds you will have 1000 users. When it reaches to the number of users, the statistic will be reset.