WebPagetest Forums
nodejs-Agent and traffic-shaping - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: nodejs-Agent and traffic-shaping (/showthread.php?tid=13529)



nodejs-Agent and traffic-shaping - BirgerK - 02-03-2015 01:17 AM

Hey guys,

I'm working at Iteratec GmbH and enabling the multistep-feature for your nodejs-Agent which works quite good!
Now I'm trying to get the traffic-shaping feature working but the documentation doesn't match the code.

At the docu it says, there should be a switch "--trafficShaper" and "--trafficShaperArg". By that switches you should be allowed to give the client a customized traffic-shaping script.
But in the code (wptdriver.bat and .sh) I can't find those switches. Aren't they implemented yet or did I miss them?

Second thing: if you use the builtin ipfw traffic-shaping, are there network performance problems, if 3 nodejs-agents are using traffic-shaping over the same notebook-connection?

Best regards,
Birger


RE: nodejs-Agent and traffic-shaping - sigurdur - 02-03-2015 02:27 AM

1. I believe the traffic shaper is executed through the daemon that's running (the agent), so when it grabs a job from the WPT server, it sees the traffic shaping bit and executes it.
https://github.com/WPO-Foundation/webpagetest/blob/master/agent/js/src/agent_main.js#L616

2. Depends on how much load you're putting on the connection at any time.


RE: nodejs-Agent and traffic-shaping - BirgerK - 02-03-2015 03:37 AM

Thanks for your fast answer!

You're right, that's the built-in traffic-shaping which uses by default ipfw of the "host"-notebook.

But the documentation talks about the possibility to use a selfmade traffic-shaping script by using the "--trafficShaper" switch. By setting this switch the application (especially your linked function) should use this selfmade script instead of ipfw.
But I can't find that switch in the existing start-scripts.


RE: nodejs-Agent and traffic-shaping - sigurdur - 02-03-2015 03:54 AM

(02-03-2015 03:37 AM)BirgerK Wrote:  But the documentation talks about the possibility to use a selfmade traffic-shaping script by using the "--trafficShaper" switch. But I can't find that switch in the existing start-scripts.

Ah, yes .. it's a custom implementation and hasn't been integrated to the "core"
See https://github.com/WPO-Foundation/webpagetest/issues/147

You might be able to find some modification in the text/links there to the scripts that will help you.