Any way to simulate network congestion?

I’m looking for a way to make Meteor.subscribe, method calls, and page changes occur very slowly, as if over a bad network connection. I’m using Firefox on Mac, if that matters. Any suggestions?

Chrome Developer tools let you simulate not only screen size and dimensions, but network speeds. It’s on the same page as where you would specify an iPhone/iPad or other device, and is under the Network section. Goes down as low as 2G and a 50Kbs GPRS modem.

4 Likes

@awatson1978 - have you verified that chrome network throttling works as expected for sockets? I tried it out just now and it did not seem to have an impact on the connection speeds for the page.

Sorry, haven’t looked at this in a few years. Make sure you’re not using loopback device, cached data, prefetch data, pre-rendered components, etc. Using that tool is an exercise in isolating code, as I recall. There’s a lot of functionality built in by default nowdays to address network congestion… network routing, caching, prefetching, optimistic UI, etc. Gotta work around all that stuff to get proper tests.