Gatling version: 3.11.3
Gatling flavor: java kotlin [ * ] scala javascript typescript
Gatling build tool: [ * ] maven gradle sbt bundle npm
Hi Team,
We are currently working on checking the Disaster recovery of our application, where we would start the test and we will simulate the primary region to down and try to find the time in which it route to secondary region.
When we executed the test and the above steps, the requests were routed to primary region even after our application routed to the secondary region.
Then, we added the system property to set networkaddress cache ttl as zero seconds, which also didn’t help. So, we suspect that the threads are caching the address irrespective of system property when they are initialized.
Below I have added the code snippet. Please help to rectify the problem.
System.setProperty("networkaddress.cache.ttl", "0") // 30 seconds
System.setProperty("networkaddress.cache.negative.ttl", "0")
val httpConfig: HttpProtocolBuilder = http.header("Content-Type", "application/json")
.header("Cache-Control","no-cache")
.disableWarmUp
.disableFollowRedirect
.disableCaching
var executionSetup: SetUp = setUp(
CreateApplicationToken.applicationTokenScenario.inject(atOnceUsers(PerfConfig.authUser)).andThen(
CreateAndDelete.createEntitlementV4PreFailOverScenario2.inject(stressPeakUsers(createEntPreFailOver) during(1 seconds)),
CreateAndDelete.getEntitlementAfterCreateV4PreFailOver.inject(stressPeakUsers(searchLicenseAfterCreateEntPreFailOver) during(1 seconds)),
CreateAndDelete.searchLicensesAfterCreateV4PreFailOver2.inject(stressPeakUsers(searchLicenseAfterAssignLicPreFailOver) during(1 seconds)),
CreateAndDelete.assignLicV4PreFailOverScenario2.inject(stressPeakUsers(assignLicPreFailOver).during(0 seconds)).throttle(reachRps(12) in (0 seconds),holdFor(PerfConfig.duration minutes))
.andThen(
CreateAndDelete.createEntitlementV4FailOverScenario2.inject(stressPeakUsers(createEntFailOver) during(1 seconds)),
CreateAndDelete.getEntitlementAfterCreateV4FailOver.inject(stressPeakUsers(searchLicenseAfterCreateEntFailOver) during(1 seconds)),
CreateAndDelete.searchLicensesAfterCreateV4FailOver2.inject(stressPeakUsers(searchLicenseAfterAssignLicFailOver) during(1 seconds)),
CreateAndDelete.assignLicV4FailOverScenario2.inject(stressPeakUsers(assignLicFailOver).during(0 seconds)).throttle(reachRps(12) in (0 seconds),holdFor(PerfConfig.duration minutes))
.andThen(
CreateAndDelete.createEntitlementV4PostFailOverScenario2.inject(stressPeakUsers(createEntPostFailOver) during(1 seconds)),
CreateAndDelete.getEntitlementAfterCreateV4PostFailOver.inject(stressPeakUsers(searchLicenseAfterCreateEntPostFailOver) during(1 seconds)),
CreateAndDelete.assignLicV4PostFailOverScenario2.inject(stressPeakUsers(assignLicPostFailOver).during(0 seconds)).throttle(reachRps(12) in (0 seconds),holdFor(PerfConfig.duration minutes)),
CreateAndDelete.searchLicensesAfterCreateV4PostFailOver2.inject(stressPeakUsers(searchLicenseAfterAssignLicPostFailOver) during(1 seconds))
)
)
)
).maxDuration(PerfConfig.duration minutes)
[ * ] I made sure I’ve update my Gatling version to the latest release
[ * ] I read the guidelines and how to ask a question topics.
[ * ] I provided a SSCCE (or at least, all information to help the community understand my topic)
[ * ] I copied output I observe, and explain what I think should be.