Map a CustomerID to a single VU from a sharedArray

I’m trying to figure out if K6 supports this situation or not. I have a json payload that gets loaded into a SharedArray and then the Load test is run by randomly selecting a request from the array.

What I’m trying to envision is K6 able to take a single request from the payload and map it a single vu for it to run and then take another request and map it to another vu. I’m not sure if K6 can handle this or not since the payload gets loaded once during setup.

Any help would help. Thank you

How many requests do you have (I assume you’re referring to request payload)?

If you load all the payloads in the shared array then you can select payloads based on the id of the virtual user. Documentation.