How to simulate slow internet connection

19

5

I currently deploy with GAE (google app engine) and I try to implement some AJAX validation. So I got a couple text-fields and "spinners" (ajax loaders) which should be displayed when an AJAX request is sent. But I deploy on my local computer (localhost), so the GAE SDK reacts very fast on any request. It takes about 50-70 ms(miliseconds) to perform the whole ajax request, which is far far away from the real.

Is there a way to somehow simulate slow Internet connection? I just want to see how my "spinners" work. I want to test some ajax setting (jquery) about timeouts, errors and so on...

Any ideas ?

V-Light

Posted 2011-06-14T17:19:01.990

Reputation: 410

You are looking for a latency simulator. A search for that term should return something useful. – Anonymous – 2011-06-14T18:01:17.680

what is your current internet speed? which speed do you want to have (approximately)? – kokbira – 2011-06-14T18:34:13.053

ADSL (~ 8000 KBit/s Down). There is a nice feature in adobe's flash Player. If you develop an Pre-Loader with AS you can easy test it in flash player with different speed (kind of Dual-Up, ISBN and DSL 1000 simulation) – V-Light – 2011-06-14T19:49:44.863

Answers

9

If you use a browser to simulate that, you can use Firefox Throttle, Internet Explorer Throttle or Fiddler.

kokbira

Posted 2011-06-14T17:19:01.990

Reputation: 4 883

Link [1] is dead – tuxayo – 2017-07-26T18:04:50.507

@tuxayo, thank you. The same occurred to link [2] (now it points to a hosting service - it normally happens when the domain is abandoned). I asked meta.stackoverflow.com about it and I'll correct the answer later. – kokbira – 2017-07-31T16:29:19.460

I removed the links. Later, I would improve the answer (or someone else post a better and updated answer). – kokbira – 2017-08-01T20:20:03.613

Fiddler did the trick. At least i was able to test the AJAX request @ Dual-Up Modem Speed. – V-Light – 2011-06-14T21:39:38.487

5

Using linux you have a software called trickle that launches a process and limits its bandwidth usage.

user39559

Posted 2011-06-14T17:19:01.990

Reputation: 1 783

I'll take a look... but, actually, i'm using kinda 'complicated' system. I run Ubuntu in Win7 (vmware) and use GAE. The reason is - linux command line and no need to install python under windows. But sometimes its getting to much for my laptop (IDE, 2 browsers, bash...and thats all virtualy) so i decided to use my internal IP so i can access the GAE development 'server' from windows. Like http://192.168.xxx.xxx:8181/myApp/ So i, actually, deploy in Windows but it all runs in Ubuntu...So I don't know if trickle can handle with this

– V-Light – 2011-06-14T20:01:37.747

It's not clear what is virtual on what. If you run Firefox inside Ubuntu inside vmware inside Win7, just call Firefox by trickle -d 10 firefox. If it's the other way around, you may try trickle -d 10 vmware to launch Win7 inside Ubuntu, but I can't say for sure how it will work. – user39559 – 2011-06-16T15:43:52.700

Win7 is Host (OS which runs virtualization software -vmware workstation 7). Ubuntu 10.10 is a Guest OS. Python and GAE is installed in Ubuntu. – V-Light – 2011-06-16T19:39:56.617

So did sudo apt-get install trickle && trickle -d 10 firefox work? You can test it by downloading a big file from a fast server. Make sure firefox is closed when you run this. – user39559 – 2011-06-17T15:23:44.987

4

I would check out Charles Proxy. It has bandwidth throttling and is cross-platform with a very clean interface.

Jacob Swartwood

Posted 2011-06-14T17:19:01.990

Reputation: 141

2

This is free and simple for Mac OS X and works with the every browser: http://mschrag.github.io/

Simonini

Posted 2011-06-14T17:19:01.990

Reputation: 121

0

You can use a "slow Internet connection" from a mobile phone (for example, GPRS). You must have a mobile phone that become a modem when connected to the PC and a carrier that provides that kind of connection.

For example, I can connect my LG phone in my computer and use a dial-up program (provided by LG) to perform a connection in TIM, my carrier. So, my internet connection is about 40kbps.

You will have a slow connection, but you cannot adjust its speed only with that.

kokbira

Posted 2011-06-14T17:19:01.990

Reputation: 4 883

1Although a good idea, it doesn't really answer the question on how to simulate a slow connection. In fact, it is a slow connection. – MEMark – 2014-12-08T18:50:20.167

I agree. "To use a simulated slow solution" is different than "to use a real slow solution", because on the first case you probably would have more control on connection speed. But for that particular case where developer is using a computer that can use different internet connection types (wi-fi, rj45...) with different speeds, it is easier to simply change the connection in use than searching and installing particular solutions. Well, it is an alternative. – kokbira – 2014-12-09T14:05:33.193

It answers the question on an alternative way - like a HW+procedure way where it is expected a SW+programming way. – kokbira – 2014-12-09T14:06:47.343