TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Add Latency to Localhost

126 pointsby turbodogover 14 years ago
A short post on using tc to simulate high latency connections on a local box.

8 comments

delanoover 14 years ago
On FreeBSD and OSX, you can use ipfw:<p><pre><code> sudo ipfw pipe 1 config bw 50KBytes/s delay 100ms sudo ipfw add 1 pipe 1 src-port 80 sudo ipfw add 2 pipe 1 dst-port 80 </code></pre> But don't forget to disable it!<p><pre><code> sudo ipfw delete 1 sudo ipfw delete 2</code></pre>
xtacyover 14 years ago
Mininet is a project at Stanford that provides an API to emulate a multi-node network on a single machine. It uses linux containers and namespaces for configuration/resource isolation.<p>Project page: <a href="http://www.openflowswitch.org/foswiki/bin/view/OpenFlow/Mininet" rel="nofollow">http://www.openflowswitch.org/foswiki/bin/view/OpenFlow/Mini...</a><p>Paper: <a href="http://conferences.sigcomm.org/hotnets/2010/papers/a19-lantz.pdf" rel="nofollow">http://conferences.sigcomm.org/hotnets/2010/papers/a19-lantz...</a><p>Other similar projects:<p><pre><code> * http://clownix.net/ * http://www-x.antd.nist.gov/nistnet/</code></pre>
评论 #2006186 未加载
joshuaccover 14 years ago
Anyone know a good way to replicate this in Windows? Would be great to have a more user-like experience when working on my Rails app.
评论 #2005431 未加载
评论 #2005430 未加载
评论 #2005111 未加载
评论 #2005436 未加载
评论 #2007601 未加载
评论 #2005535 未加载
jwsover 14 years ago
Do be aware that your linux loopback has an MTU an order of magnitude greater than ethernet, so your latency sensitive TCP startup times are not going to behave the same.
评论 #2007238 未加载
MikeCaponeover 14 years ago
Could anyone explain why that would be desirable? Is it to test out a website design that you are hosting locally, and you want it to "feel" right? Something else?
评论 #2005286 未加载
评论 #2005433 未加载
评论 #2005357 未加载
评论 #2007932 未加载
评论 #2005883 未加载
burgerbrainover 14 years ago
qdiscs in linux have always seems something of an underdocumented dark art to me. I've used HTB to slow down packets that I mark with iptable rules, but that's about as fancy as I can get. Does anybody know of some nice documentation about this stuff that isn't a decade old? ;)
评论 #2005102 未加载
jtchangover 14 years ago
For those on FreeBSD dummynet was perhaps one of the most useful traffic shapers I've ever used. I had a router built on FreeBSD going strong for more than 3 years on an old pentium 90 that would route traffic like no ones business.
s3grahamover 14 years ago
iprelay too:<p><pre><code> iprelay -b30000 8000:localhost:80</code></pre>