Forum Discussion
Paul_Dawson_103
Feb 15, 2006Nimbostratus
Simulating Latency
Hello,
We are looking to simulate latency on the network to test an application in a WAN environment.
Would it be plausible looking to iRules to investigate if this is possible?
Any pointers/tipes would be appreciated.
- JRahmAdminI was thinking for loops. I tested this in the lab, on my BigIP this equates to about 58 milliseconds of delay:
when CLIENT_ACCEPTED { set y1 [clock clicks -milliseconds] for { set x 0 } { $x < 100000 } { incr x } {do nothing} set y2 [clock clicks -milliseconds] set time1 [expr $y2 - $y1] log "For loop time is $time1 milliseconds" }
- Colin_Walker_12Historic F5 AccountNote that, while this is possible via iRules, it is not recommended and is not the intended use of the language.
- Colin_Walker_12Historic F5 AccountYes, you could...but like I said, I don't recommend putting it in place at all on a production system.
- patrick_jenny_7Historic F5 AccountYou may wish to consider using DummyNet http://info.iet.unipi.it/~luigi/ip_dummynet/ to simulate a WAN link outside of the BIG-IP.
- BlurredVision_1Nimbostratusforgive me if I am wrong, but triggering this on CLIENT_ACCEPTED just means that the initial connection is waylaid. latency is evident on every packet not just the 4th...
- Nicolas_MenantEmployeeif you do it on HTTP protocol you may use the same code in when HTTP_REQUEST and/or HTTP_RESPONSE
- Colin_Walker_12Historic F5 AccountThis would simulate latency per session, not per packet, you're correct.
- Cyril_MAltostratus
According to this https://devcentral.f5.com/s/articles/irules-and-wait-states-after-makes-life-better you'd rather use this irule
when HTTP_REQUEST { after 50 }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects