RE: Network Emulation Trace Developer Tools Proposal: PoC Info

Hello Utkarsh,

Thank you for sharing.

The current ideas being explored in the Web & Networks IG  is one where the browser emulates the dynamic network conditions using existing features in DevTools and a network conditions trace-file captured from the real field. The idea is also extended to enable the users to capture field traces themselves using the browser too (believe it’s useful), apart from the tool using some sample reference traces stored in a shared repo.

TC/netem and equivalent tools at OS level are also being considered, but since those are not used by the Browser devtools, it’s still an open discussion topic.

Your proposal is interesting. The paper says you bring in a bridge in between client and server that one can configure (eg. network params). I assume that can be extended to read a trace file which emulates a dynamically changing network condition as well (a sample trace from a stadium or driving by a busy market place). It would interesting to know if this “bridge medium instance” can run inside a container hosted on the client device that Browser DevTools can configure directly. I am not sure.

Anyways, I propose to bring this suggestion in our IG for members to study. I will request Song Xu (co-chair of the Web & Networks IG) who is driving the workstream to create a github issue focused on network emulation in general (within browser or other). Ref: Issues · w3c/network-emulation (github.com)<https://github.com/w3c/network-emulation/issues>

Once that is created, will let all know. It would be great if you could share these inputs there in github as well. Collating the various ideas and proposals listed in this thread will aid the discussion.

Regards
Sudeep
Co-Chair Web & Networks IG

From: Goel, Utkarsh <ugoel@akamai.com>
Sent: Tuesday, June 29, 2021 11:16 PM
To: Danilo Velasquez <danilo.velasquez@adevinta.com>; Divakaran, Sudeep <sudeep.divakaran@intel.com>
Cc: Patrick Meenan <pmeenan@webpagetest.org>; Yoav Weiss <yoavweiss@google.com>; Tim Kadlec <tim@timkadlec.com>; public-web-perf@w3.org; Dominique Hazael-Massieux <dom@w3.org>; DRUTA, DAN <dd5826@att.com>; Song XU <xusong@migu.chinamobile.com>; Svennebring, Jonas <jonas.svennebring@intel.com>
Subject: Re: Network Emulation Trace Developer Tools Proposal: PoC Info

This reminds me of a netem utility I put together a few years ago to emulate real world cellular network characteristics (loss/latency/throughput) as seen from a bunch of Akamai machines for some h2 perf research. This may not be exactly what you are looking for, but it seems relevant enough that I thought I’d share here.

https://developer.akamai.com/blog/2017/11/27/how-replaying-cellular-network-characteristics-cloud-infrastructure

https://github.com/akamai/cell-emulation-util


Utkarsh

From: Danilo Velasquez <danilo.velasquez@adevinta.com<mailto:danilo.velasquez@adevinta.com>>
Date: Tuesday, June 29, 2021 at 10:31 AM
To: "Divakaran, Sudeep" <sudeep.divakaran@intel.com<mailto:sudeep.divakaran@intel.com>>
Cc: Patrick Meenan <pmeenan@webpagetest.org<mailto:pmeenan@webpagetest.org>>, Yoav Weiss <yoavweiss@google.com<mailto:yoavweiss@google.com>>, Tim Kadlec <tim@timkadlec.com<mailto:tim@timkadlec.com>>, "public-web-perf@w3.org<mailto:public-web-perf@w3.org>" <public-web-perf@w3.org<mailto:public-web-perf@w3.org>>, Dominique Hazael-Massieux <dom@w3.org<mailto:dom@w3.org>>, "DRUTA, DAN" <dd5826@att.com<mailto:dd5826@att.com>>, Song XU <xusong@migu.chinamobile.com<mailto:xusong@migu.chinamobile.com>>, "Svennebring, Jonas" <jonas.svennebring@intel.com<mailto:jonas.svennebring@intel.com>>
Subject: Re: Network Emulation Trace Developer Tools Proposal: PoC Info
Resent-From: <public-web-perf@w3.org<mailto:public-web-perf@w3.org>>
Resent-Date: Tuesday, June 29, 2021 at 10:30 AM

I see a lot of potential on this. At Adevinta we see some patterns of user traffic correlated to the time or action of the day. So there are categories that are usually accessed from the comfort of the wifi at home and others having more traffic during commuting hours. It would be interesting to simulate in more detail network conditions to adjust how/what things are delivered based on the current user circumstances.

In a similar use case, I've been working with The Green Web Foundation and they have this grid-intensity library<https://urldefense.com/v3/__https:/github.com/thegreenwebfoundation/grid-intensity__;!!GjvTz_vk!G7_BTDuMMcJEMNzTx4wC91IGe_E2Z-o38EZaHaOHZeFQGsGUW7iB7-FIWeJ9$>, which based on the current carbon intensity grid of the user can suggest skip doing some expensive operations. If we could simulate real conditions we could fine tune this library too.

And of course, the folks at Lighthouse could use this in their tools too and give better localised network conditions. Nowadays we are following global patterns (Simulate a 3G connection with a Moto 4G), whilst the 75th percentile of users in Austria or Italy doesn't have the same requirements as the same percentile in Belarus, Chile or Morocco.

Thanks!
Danilo Velasquez

On Wed, 10 Mar 2021 at 07:09, Divakaran, Sudeep <sudeep.divakaran@intel.com<mailto:sudeep.divakaran@intel.com>> wrote:
Thanks Yoav for sharing possible ideas and connecting us with Patrick & Tim from webpagetest.org<https://urldefense.com/v3/__http:/webpagetest.org__;!!GjvTz_vk!G7_BTDuMMcJEMNzTx4wC91IGe_E2Z-o38EZaHaOHZeFQGsGUW7iB7zAfVCGI$>. The suggestions are in-line with the discussions we have had in our Web & Networks IG (WNIG).

I think Patrick’s suggestion regarding wiring it to netem is a good recommendation too.

The collected trace could follow a standard format. How it is used for network emulation can be topic for broader discussion, e.g. either its done in the browser (current demo proposal) or even lower using netem, etc.

The greater interest seems to stem from the view that having the capability to emulate large variances in cellular connectivity from region to region (expected between & within networks) will benefit testing applications like media streaming quickly (ref traces from sub-way, driving through congested market place, InterRAT handover or while switching networks, etc are good examples). Having a common repo that the browser developer tools can use (like WPT repo) are indeed good suggestions.

I concur, how the developer can adapt the app based on these tests isn’t very clear. Perhaps examples like how NetInfo API are used by Apps today could be one.

To add, another topic being discussed in our IG, which is still under evaluation, is using predicted information about varying cellular conditions (if possible to make it available through some API). It may be better option to adapt, than relying on real-time congestion info or net info.

We will help connect the WNIG members with webpagetest.org<https://urldefense.com/v3/__http:/webpagetest.org__;!!GjvTz_vk!G7_BTDuMMcJEMNzTx4wC91IGe_E2Z-o38EZaHaOHZeFQGsGUW7iB7zAfVCGI$> team to discuss this further (adding Jonas in the loop of this thread as well). We will also create a github thread so that we can track the discussions and documentations in one place.

Regards
Sudeep
Co-Chair Web & Networks IG

From: Patrick Meenan <pmeenan@webpagetest.org<mailto:pmeenan@webpagetest.org>>
Sent: Tuesday, March 9, 2021 9:58 PM
To: Yoav Weiss <yoavweiss@google.com<mailto:yoavweiss@google.com>>
Cc: Divakaran, Sudeep <sudeep.divakaran@intel.com<mailto:sudeep.divakaran@intel.com>>; Tim Kadlec <tim@timkadlec.com<mailto:tim@timkadlec.com>>; public-web-perf@w3.org<mailto:public-web-perf@w3.org>; Dominique Hazael-Massieux <dom@w3.org<mailto:dom@w3.org>>; DRUTA, DAN <dd5826@att.com<mailto:dd5826@att.com>>; Song XU <xusong@migu.chinamobile.com<mailto:xusong@migu.chinamobile.com>>
Subject: Re: Network Emulation Trace Developer Tools Proposal: PoC Info

Looks interesting.  I could see WebPageTest supporting a trace profile to use during testing - would just need to figure out how to wire it into netem.  The more interesting parts would be to better emulate the ramps for cellular connectivity.

That said, I'm not sure web developers would be able to do much with it. They tend to have enough of a problem optimizing for a few fixed profiles and adding variability to that may not result in useful signal for them to optimize towards (at least for the typical case of web page loads).  A video stream or protocol/congestion control development are much better fits for being able to adapt to variable conditions quickly.

I'm happy to chat more, otherwise I'll keep an eye on the project and see if there's anything I can expose in WebPageTest to help.

On Tue, Mar 9, 2021 at 10:28 AM Yoav Weiss <yoavweiss@google.com<mailto:yoavweiss@google.com>> wrote:
Hey folks,

To continue the conversation from today's meeting<https://urldefense.com/v3/__https:/www.w3.org/2021/03/09-web-networks-minutes.html__;!!GjvTz_vk!G7_BTDuMMcJEMNzTx4wC91IGe_E2Z-o38EZaHaOHZeFQGsGUW7iB7wfcPEyJ$>, I think it might be interesting for y'all to talk to +Patrick Meenan<mailto:pmeenan@webpagetest.org> and +Tim Kadlec<mailto:tim@timkadlec.com> who work on webpagetest.org<https://urldefense.com/v3/__http:/webpagetest.org__;!!GjvTz_vk!G7_BTDuMMcJEMNzTx4wC91IGe_E2Z-o38EZaHaOHZeFQGsGUW7iB7zAfVCGI$>

Here's the scenario where I imagine network tracing to be extremely interesting:

  *   Folks around the world capturing real-life network conditions (e.g. "mid-day in Bangalore", "rural area in US", "London Tube", etc)
  *   WPT has a collection of those traces that developers can automatically apply when testing their site's performance
  *   Developers (automatically) test their site loading under those conditions, and (hopefully) find performance bottlenecks that are currently invisible
What do y'all think?

Cheers,
Yoav

On Mon, Feb 8, 2021 at 11:32 AM Divakaran, Sudeep <sudeep.divakaran@intel.com<mailto:sudeep.divakaran@intel.com>> wrote:
Dear Chairs and all in Web Perf WG,

I am Co-Chair of the W3C Web & Networks IG. At TPAC 2020 WG meeting, during the Network Diagnostics API proposal discussion, I brought up a couple of topics which may be of interest in this WG. One amongst them was regarding a proposal we received to extend network Developer tools to emulate time-variant network conditions to assist web app testing (e.g. either emulating real world trace or user defined traces).

Background:
I would like to follow up from where we left. The Web Performance WG Chairs expressed interest and asked us to share any links, when available.
Pls. refer to minutes <https://w3c.github.io/web-performance/meetings/2020/2020-10-TPAC/index.html#h.8gfnc7p4nih<https://urldefense.com/v3/__https:/w3c.github.io/web-performance/meetings/2020/2020-10-TPAC/index.html*h.8gfnc7p4nih__;Iw!!GjvTz_vk!G7_BTDuMMcJEMNzTx4wC91IGe_E2Z-o38EZaHaOHZeFQGsGUW7iB716L1Dk2$>>
I quote - “Yoav: Network trace idea sounds interesting in context of synthetic testing, but possibly orthogonal to this. If you could share links that'd be great.”

Info:
The IG Members proposing this tool has made a simple Proof-of-concept, which also integrates into Browser Developer Tools (it’s a very basic implementation with just one parameter viz., DL bandwidth).
For more details, take a look at the demo video available on TPAC 2020 website @  <https://www.w3.org/2020/10/TPAC/wn-lpp.html<https://urldefense.com/v3/__https:/www.w3.org/2020/10/TPAC/wn-lpp.html__;!!GjvTz_vk!G7_BTDuMMcJEMNzTx4wC91IGe_E2Z-o38EZaHaOHZeFQGsGUW7iB70lPpXk6$>>
Source codes and other info. are available on Github at  <https://github.com/intel/lpp-network-trace<https://urldefense.com/v3/__https:/github.com/intel/lpp-network-trace__;!!GjvTz_vk!G7_BTDuMMcJEMNzTx4wC91IGe_E2Z-o38EZaHaOHZeFQGsGUW7iB7zm60b6U$>>

Upcoming Event:
We plan to have the team make a presentation in our upcoming Web & Networks IG meeting in early March ’21 (date yet to be finalised). We can share the Webex details, if anyone would like join us. Kindly let me know. I can work with the W3C Staff to forward the Webex Details, once the dates are finalised.

Request:
The team is seeking inputs and W3C engagement from interested members to add more features (emulate time variant latency, UL BW, etc), define trace format, Network Developer Tools UI, etc.
Our Interest Group is looking for feedback about this tool proposal and whether it fits in the broader scheme of things for Browsers. We would be happy to answer any queries using this email thread.

Regards
Sudeep
Co-Chair, Web & Networks IG
(sent on behalf of IG WNIG Co-Chairs & W3C Staff in CC)

Received on Wednesday, 30 June 2021 06:55:36 UTC