views:

360

answers:

6

The Performance Golden Rule from Yahoo's performance best practices is:

80-90% of the end-user response time is spent downloading all the components in the page: images, stylesheets, scripts, Flash, etc.

This means that when I'm developing on my local webserver it's hard to get an accurate idea of what the end user will experience.

How can I simulate latency so that I can understand how my application will perform when I've deployed it on the web?

I develop primarily on Windows, but I would be interested in solutions for other platforms as well.

+1  A: 

You can just set up a proxy outside that will tunnel traffic from your web server to it and then back to local browser. It would be quite realistic (of course it depends where you put the proxy).

Otherwise you can find many ways to implement it in software..

Jack
+2  A: 

YSlow might help you out. YSlow analyzes web pages based on Yahoo!'s rules.

Firefox Throttle. This can throttle speed (Windows only).

These are plugins for Firefox.

egon
+3  A: 

A laser modem pointed at the mirrors on the moon should give latency that's out of this world.

Pete Kirkham
... but you'd get some performance reduction during inclimate weather, so the testing would be inconsistent.
Kieveli
+1  A: 

Run the web server on a nearby Linux box and configure NetEm to add latency to packets leaving the appropriate interface.

If your web server cannot run under Linux, configure the Linux box as a router between your test client machine and your web server, then use NetEm anyway

MarkR
A: 

While there are many ways to simulate latency, including some very good hardware solutions, one of the easiest for me is to run a TCP proxy in a remote location. The proxy listens and then directs the traffic back to my final destination. On a remote server, I run a unix program called balance. I then point this back to my local server.

brianegge
+5  A: 

Fiddler2 can do this very easily. Plus, it does so much more that is useful when doing development.

Michael Haren