

Simulating a Slow Internet Connection - GeneralMaximus
http://ankursethi.in/2013/07/simulating-a-slow-internet-connection/

======
Terretta
If you're on a Mac, try the Network Link Conditioner from the Hardware IO
tools downloads in Apple Dev portal.

[http://www.neglectedpotential.com/2012/05/slow-your-apps-
rol...](http://www.neglectedpotential.com/2012/05/slow-your-apps-roll/)

PS. The sleep trick is helpful, but in addition to latency, you ideally want
to experience packet loss and other weirdness.

~~~
ddb
This can be done with native osx tools as well. Here's a snippet I created
once:

    
    
      # First add a rule for all local traffic to port 80 to go into pipe 1
      # 100 is the rule number which will be used for referencing the rule later
      sudo ipfw add 100 pipe 1 ip from 127.0.0.1 to 127.0.0.1 dst-port http
      
      # To display the rule use
      # sudo ipfw show 100
      
      # configure the settings of the pipe as you please
      # 50kbit/s bandwidth
      sudo ipfw pipe 1 config bw 50Kbit
      # 200ms lag
      sudo ipfw pipe 1 config delay 200ms
      # 20% random packet loss
      sudo ipfw pipe 1 config plr 0.2
      
      # To display the current connections on the pipe use:
      # sudo ipfw pipe 1 show
      
      # when finished testing don't forget to delete rule and pipe
      sudo ipfw delete 100
      sudo ipfw pipe 1 delete

~~~
gingerlime
This looks great, do you know if there's an equivalent for linux? can you do
something like this with iptables / ufw?

~~~
nilnull
Try the tc command which allows you to control the traffic and set things like
latencies, simulate physical congestion etc.

------
idunno246
Can't recommend [http://www.charlesproxy.com/](http://www.charlesproxy.com/)
enough for any web development. One of a long list of features is throttling.

------
binarycrusader
On Solaris, its trivial to simulate lower bandwidths using VNICs:

[https://blogs.oracle.com/JeffV/entry/virtual_network_part_4](https://blogs.oracle.com/JeffV/entry/virtual_network_part_4)

Or, alternatively, using flowadm:

[http://docs.oracle.com/cd/E19963-01/html/821-1458/gfkci.html](http://docs.oracle.com/cd/E19963-01/html/821-1458/gfkci.html)

If you want to simulate latency, that's a little harder, but can be done using
hxbt:

[http://www.c0t0d0s0.org/archives/6625-Less-known-Solaris-
fea...](http://www.c0t0d0s0.org/archives/6625-Less-known-Solaris-features-
hxbt-or-WAN-emulation.html)

[http://web.archive.org/web/20130517125147/http://hub.opensol...](http://web.archive.org/web/20130517125147/http://hub.opensolaris.org/bin/download/Community+Group+networking/WebHome/hxbt.tar.gz)

------
marquis
Another good method: [http://daniel.haxx.se/blog/2010/12/14/add-latency-to-
localho...](http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/)

------
BWStearns
Connect to your service via Tor :)

~~~
finnw
Unless your site is on cloudflare

~~~
BWStearns
I was able to get to a site on cloudflare through Tor yesterday.

