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

Network throttling #210

Closed
paulb-elastic opened this issue Feb 2, 2021 · 4 comments
Closed

Network throttling #210

paulb-elastic opened this issue Feb 2, 2021 · 4 comments

Comments

@paulb-elastic
Copy link
Contributor

As a user of Elastic Synthetic Monitoring
I want to be able to emulate different network speeds
So that I can get a consistent performance measurement of my website, using a realistic network type (i.e. not variable line speed)

ACs:

  • The ability to configure the network speed used by a specific monitor (the same speed will be used throughout all steps of the user journey)
  • The download, upload and latency can be configured for the connection
  • It is possible to determine the network throttling used when looking at a test result

We need to consider where these properties are set, for example as parameters to the journey object? When integrated with Fleet with a curated UI for configuring monitors, perhaps this could be extended to have a list of common network types to choose from, which sets the individual parameters accordingly.

As in the ACs, outside of any Fleet/Integration curated UI to configure these, there is a @elastic/observability-design requirement to consider where this is shown in the results. It should be possible to see what network emulation was set against each monitor (bearing in mind it could change over time).

@hmdhk
Copy link
Contributor

hmdhk commented Feb 2, 2021

They only thing I would add to this is that users might not be aware that they need to enable throttling to simulate a real world situation so I think we should also choose reasonable defaults for throttling and allow users to change that if they want to through the configuration.

As a first step we can have two different throttling profiles, e.g. Desktop and Mobile (tests need to run against both profiles). These profiles could be used for CPU Throttling as well.

@paulb-elastic
Copy link
Contributor Author

For reference, throttling can be added to any journey today, by including the following before any navigation:

const client = await page.context().newCDPSession(page);
await client.send('Network.emulateNetworkConditions', {
	offline: false,
	// Download at 0.5Mb/s
	downloadThroughput: 1024 * 1024 * 0.5,
	// Upload at 4Mb/s
	uploadThroughput: 1024 * 1024 * 4,
	latency: 20
});

Parameters for Network.emulateNetworkConditions are described here

@paulb-elastic
Copy link
Contributor Author

This is largely done, except for the last AC:

It is possible to determine the network throttling used when looking at a test result

@drewpost / @liciavale is this something you have covered in the SyntheticsApp requirements?

@vigneshshanmugam
Copy link
Member

Closing this issue as we have a meta to track these configs in the Synthetics App.

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

3 participants