Forum Discussion
Frank_Mancini_3
Nimbostratus
Mar 11, 2008Irule that waits?
Is it possible to write an iRule that has a wait time of 25 seconds before proceeding to the next step?
- Nicolas_Menant
Employee
Hi, I am afraid this it not possible for the moment - The_Bhattman
Nimbostratus
What about the following?{set delay_count 0} {$delay_count<50000} {incr delay_count} {...
- Nicolas_Menant
Employee
I'm not sure this iRule will not have some important performance impact on the cpu - spark_86682Historic F5 AccountNo, it's not possible to do this. iRule execution is single-threaded, so if you did somehow pause execution (like run a tight wait-loop as someone suggested), then you would be holding up all other packet processing. The multiple watchdogs on the LTM would notice this, and take appropriate action (restart tmm, or failover, or reboot, or some combination thereof). So you don't want to do that. Could you explain what you're really wanting to do? Perhaps we can find some different way of accomplishing it.
- The_Bhattman
Nimbostratus
Is it not possible because some has tried it? - Colin_Walker_12Historic F5 AccountIt's less that it's "not possible", and more that it's just a really bad idea.
- The_Bhattman
Nimbostratus
Okay somehow it just clicked in my head on what spark stated "...holding up ALL OTHER packet processing". I never realized that iRules is single-threaded. Why was it designed that way? - The_Bhattman
Nimbostratus
Excellent. Thanks for the Info - spark_86682Historic F5 AccountAs Colin said, tmm execution (and therefore iRule execution) is single-threaded. This was done for a variety of reasons, not the least of which is that you can be guaranteed that nothing else will happen while an iRule event is executing, so users don't have to worry about (e.g.) mutex locking on global variable accesses. No other connection can stomp on your global data in the middle of you accessing it. CMP introduces some complexities into this; likely someone will have to write an article on this sometime soon.
- The_Bhattman
Nimbostratus
thanks again.
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