Coffeehouse Thread

7 posts

Mimic internet delay and bandwidth in Windows

Back to Forum: Coffeehouse
  • User profile image
    davewill

    I'm looking to setup a VM to host some WCF services and I need realistic responses at the client during development.

    Is it possible to configure a Windows machine's networking stack to mimic internet delay and upstream bandwidth limits?

     

    Edit:

    netsh interface ipv4 set interface "Local Area Connection" latency=50 upstreamlimit=2000000 downstreamlimit=10000000

    OR

    netsh interface ipv4 set interface "Local Area Connection" crawlliketheinternet=enabled

  • User profile image
    kettch

    Fiddler has some tools to simulate bandwidth constraints. You have to modify a Javascript file to dial in exactly what speed you want to simulate, but it works pretty well. There are also some plugins for fiddler out there with a more complete feature set.

  • User profile image
    davewill

    @kettch: Rules -> Performance -> Simulate Modem Speeds ... i'll have to check it out.  maybe it adds both latency and bandwidth throttling.

  • User profile image
    kettch
  • User profile image
    davewill

    @kettch: I saw that too but kept looking because it seemed to only address bandwidth and not latency.  Will revisit.

  • User profile image
    kettch

    @davewill: The stock "Simulate Modem Speeds" seems to allow a delay to be inserted. Maybe a combination of things would work.

  • User profile image
    davewill

    @kettch:  Si Senor.  The CustomRules.js by default has

            if (m_SimulateModem){
                // Delay sends by 300ms per KB uploaded.
                oSession["request-trickle-delay"] = "300"; 
                // Delay receives by 150ms per KB downloaded.
                oSession["response-trickle-delay"] = "150"; 
            }

    So it seems to apply a delay based on the volume of data.  That seems reasonable for throttling bandwidth.

    Plus this Fiddler Extension http://fiddlerdelayext.codeplex.com/ for latency looks like a winner combination.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.