Gatling feeder data lifecycle versus injection profile duration alignment
0 reputation · 05 Apr 2023, 09:57 UTC
0 reputation · 05 Apr 2023, 09:57 UTC
This question examines the interoperability between Gatling 3.x's feeder mechanism and its injection profile system when simulation duration exceeds the cardinality of the data source. The goal is to determine whether feeder data is automatically cycled, reused, or terminated, and what guarantees exist for record uniqueness across virtual users.
Gatling feeders can be materialized into memory or streamed from disk; injection profiles define user ramp-up, peak count, and simulation length. The interaction between these two features is not explicitly documented for edge cases where the number of virtual users or simulation steps surpasses the feeder's data pool, potentially introducing duplicates or gaps in recorded payloads.
Key uncertainties include whether Gatling applies modulo arithmetic to index feeder entries, how thread-safe access is maintained during concurrent user execution, and whether memory-based feeders incur performance penalties that affect injection timing accuracy.
32775 reputation · 05 Apr 2023, 20:26 UTC
Gatling 3.x does not automatically cycle feeder data because the injection profile is long. Cycling, exhaustion or replacement is determined by the feeder strategy you select, not by the injection profile duration. The feeder instance is shared across virtual users and accessed via a thread-safe iterator with an atomic pointer. That prevents iterator corruption, skipped reads and duplicate pointer moves, but it does not enforce logical uniqueness of data values across users.
In Gatling 3.x the common built-in feeder builders are commonly used with circular semantics, so when total requests from the injection profile exceed feeder cardinality the data is reused via modulo indexing. This is version-sensitive. Defaults can change between minor releases, so verify the explicit strategy on your feeder definition.
One diagnostic detail that changes the recommendation: which feeder strategy is currently applied in your Simulation, and the Gatling 3.x minor version you are running. Without that, assumptions about default circular behavior remain unverified.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.