Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get it to work via Node.JS running within a container #82

Open
gdollard opened this issue Feb 21, 2023 · 5 comments
Open

Can't get it to work via Node.JS running within a container #82

gdollard opened this issue Feb 21, 2023 · 5 comments

Comments

@gdollard
Copy link

gdollard commented Feb 21, 2023

Hi, I am invoking throttle.start & stop directly in my Node.JS code. We then build an image of this (based on sitespeed.io:26.1.0) and pass a config.json file with all the various configuration for sitespeed (browsertime, connectivity, engine etc).

However, when I run the image and invoke my test function I get the following error:

ERROR: [browsertime] Error In My Test Scenario Error: Command failed: sudo ip link set dev ifb0 up
sitespeed-scenario | Cannot find device "ifb0"

I am running this on Mac.

I am able to run throttle with no problem when invoking the package directly from my global module but not when running in a container.

I noticed some settings needed when running the container on Linux (https://www.sitespeed.io/documentation/throttle/#run-in-docker-on-linux) but is there similar support for Mac?

I'd appreciate some info on this, thanks folks.

@soulgalore
Copy link
Member

Hi @gdollard there's limitations on running Docker on Mac, since they use different systems throttling connection. What you can do, is use throttle outside of your container:

  • throttle
  • start the container, run the tests
  • remove the throttling

@gdollard
Copy link
Author

gdollard commented Feb 21, 2023

thanks @soulgalore for the reply. Yes, I had a feeling there were limitations with the Mac (as documented on the sitespeed docs). My problem with throttling outside of the container is whether I can do it or now because our built container will be managed by K8S so I am not even sure if I'd be able to set the throttling from there. I need to investigate further!

Thanks for your prompt response.

@soulgalore
Copy link
Member

soulgalore commented Feb 21, 2023

Hi @gdollard another thing is that you cannot throttle the connection on K8S , you need to have access to the actual machine, so I would propose running the image somewhere else.

@gdollard
Copy link
Author

ah right, thanks for that info.

@soulgalore
Copy link
Member

There's some more information https://www.sitespeed.io/documentation/sitespeed.io/web-performance-testing-in-practice/#servers about choosing servers and where to run the tests. There's a little bit outdated documentation, I will try to update it the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants