-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
Taking a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 tested. Tried with 10, 20, and 30 virtual users. Got 0%, 2%, and 20% failed requests respectively. This is a great setup, hopefully can inform future scaling decisions.
const url = entry.request.url.replace( | ||
pattern, | ||
`${cacheKey}${__ENV.CACHE_KEY_SUFFIX}/$2/$3/$4.pbf?$5` | ||
`${cacheKey}-vu-${__VU}-${__ENV.CACHE_KEY_SUFFIX}/$2/$3/$4.pbf?$5` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a while to figure out where __VU
was defined: https://k6.io/docs/using-k6/execution-context-variables/#_vu-and-_iter-discouraged. Seemingly discouraged by the docs, but works as expected here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the discouragement, too, but continued using __VU since it was already used successfully elsewhere in the script.
The tile load test uses k6 virtual users to run different batches of requests with an increasing delay. To simulate multiple users in parallel we add a `VU_MULTIPLIER` variable that sets the desired number of parallel executions.
66bd1be
to
95fd45c
Compare
Adding the VU index into the cache key attempts to simulate a tile fetching situation that is a resource intensive as possible, where each batch of tile requests from each parallel user always misses the cache.
The path to the script needs a leading "/"
95fd45c
to
4b8df50
Compare
Thanks for the review. |
Update the tile request load testing scripts to
Connects #1776
Demo
Testing Instructions
cd
intoload-tests
VU_MULTIPLIER=10 \ CACHE_KEY_SUFFIX=$(echo $(date) | sha1sum | cut -c1-8) \ docker-compose -f docker-compose.yml run --rm \ k6 run /scripts/zoom_rio_de_janerio_with_contributor_filter.js
Checklist
fixup!
commits have been squashed