TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Add Latency to Localhost

126 点作者 turbodog超过 14 年前
A short post on using tc to simulate high latency connections on a local box.

8 条评论

delano超过 14 年前
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>
xtacy超过 14 年前
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 未加载
joshuacc超过 14 年前
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 未加载
jws超过 14 年前
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 未加载
MikeCapone超过 14 年前
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 未加载
burgerbrain超过 14 年前
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 未加载
jtchang超过 14 年前
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.
s3graham超过 14 年前
iprelay too:<p><pre><code> iprelay -b30000 8000:localhost:80</code></pre>