views:

89

answers:

3

I know this is kind of an odd question. Since I usually develop applications based on the "assumption" that all users have a slow internet connection. But, does anybody think that there is a way to programmatically simulate a slow internet connection, so I can "see" how an application performs under various "connection speeds"?

I'm not worried about which language is used. And I'm not looking for code samples or anything, just interested in the logic behind it.

+1  A: 

If you're running windows, fiddler is a great tool. It has a setting to simulate modem speed, and for someone who wants more control has a plugin to add latency to each request.

I prefer using a tool like this to putting latency code in my application as it is a much more realistic simulation, as well as not making me design or code the actual bits. The best code is code I don't have to write.

Philip Rieck
Thanks, fiddler's cool! I'm gonna check out the plugin now.
lucifer
+1  A: 

You can try Dummynet, it can simulates queue and bandwidth limitations, delays, packet losses, and multipath effects

tszming
Thank you, I will try out Dummynet.
lucifer
+1  A: 

There are TCP proxies out there, like iprelay and Sloppy, that do bandwidth shaping to simulate slow connections. You can also do bandwidth shaping and simulate packet loss using IP filtering tools like ipfw and iptables.

hobbs
Thank you, I'll have a look into iprelay and Sloppy joe.
lucifer