Forum Discussion
Terje_Gravvold
Nimbostratus
Jul 03, 2009iRule - Retry HTTP post request, including payload, to a secondary pool if primary pool fails
I've scripted a short iRule to handle resending of HTTP post requests, including XML payload/post data, to a secondary pool if primary fails. The rule is based iRule examples and forum posts.
...
David_Carlin_20
Nimbostratus
Mar 09, 2011Thanks for this code. We just implemented it and I wanted to share some changes we made to make it a little more robust.
Firstly, you set a lot of variables that you don't use: client, uri, method and host
Limiting content-length to 2048 doesn't allow large form submissions. Looking through the forum we realized we can increase this to 4000000 without running into the 4Mb limitation.
In rare occasions it wasn't resetting retries to 0, which was causing it to go to the second pool when it shouldn't. So in the else of LB_SELECTED we set retries to 0 again to get around this.
Hope this helps someone :)
Dave
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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