Status Distributor

The status code to produce is stored in the incoming request context, so, the content providers can read it (and “respect” the choice taken at the behaviour level), and might be able to select the content based on the status code.

Here we define a similar distribution as in the delay part, but with the difference that the produced values will not be interpolated.

Key Val
200 0.5
201 0.3
204 0.2

So, with that config, we will have 200 in 50% of the requests, 201 in 30% of the requests and a 204 in the rest.

Values are normalized, meaning that we could set the values to 5, 3 and 2 and the result would be the same.

{
    "name": "status_distributor",
    "config": {
        "code_distribution": [
            {"key": 200, "val": 0.5},
            {"key": 201, "val": 0.3},
            {"key": 204, "val": 0.2}
        ],
        "seed": 1
    }
}