thoraxe / istio-lab-summit-2019

Service Mesh in Action lab for Red Hat Summit 2019
10 stars 10 forks source link

Slow down frequency of execution of load generating scripts #42

Closed kaovilai closed 5 years ago

kaovilai commented 5 years ago

Example relevant files https://raw.githubusercontent.com/kaovilai/istio-lab-summit-2019/homeroom-dev/scripts/curl_customer.sh

When executing load scripts like ones found in the script above involving use of while, the output can overwhelm the display and makes exiting execution via Ctrl+C extremely delayed especially with use of web terminals offered by workshop-dashboard. I have seen up to a minute after hitting Ctrl+C before seeing a working terminal again.

Might need to add sleep, or some other command to slowdown the loops.

kaovilai commented 5 years ago

@knrc @bdecoste Do you think the appropriate solution is to slowing down while loops? We don't want to spam the websocket with requests. Alternatively, have something queued and waiting to generate load behind the scenes. Then we can remove instructions about adding the load manually to the service mesh.

@thoraxe We could request student use their own terminal hopelessly just for the load to avoid the issue. What do you think? Would it fit as a 'productized' workshop?

kaovilai commented 5 years ago

I think sleep for 1 second is reasonable. To see Kiali graph shifts to 80/20, one would need in a 10 second interval 8 to go to endpoint 1, and 2 to go to endpoint 2.,

Though it will be impossible to get close to 33% on each endpoints in one of the sections.

kaovilai commented 5 years ago

If we add another endpoint so that we have an even 4, that should allow in 10 seconds with 1 load per second to have a nice distribution percentage.

kaovilai commented 5 years ago

Will try reducing output amount by >> null which should help with the problem