Komtanoo_Pinpim
Feb 27, 2007Nimbostratus
redirect traffic basing on the answer from webserver
Hi,
My company just bought a 2 bigip boxes. We have a weird requirement to redirect some traffic basing on answer of webserver.
It works like this:
1.Client sends request to url like: http://hostname/get_file/1234.zip
2.BigIP forwards the request to 'webserver pool'.
3.Webserver pool does some permission checking and responds with the header containing: “X-Reproxy-Static: 1234.zip”.
4.BigIP scans the response and forward the request to 'static file pool'.
I'm not sure if irule can do this. I read the manual and tried to compose the irule but it doesn't work, the output is just the white blank page.
when HTTP_RESPONSE {
if {[string length [HTTP::header X-Reproxy-Static]] > 0} {
pool static-pool
}
}
------------
The reason that we need this rule is because those files need user permission checking and we don't want to spoon feed large files by apache webservers, but static webservers in static pool instead. There is a software solution called "PerlBal", it has this feature, but some ppl in my company don't want to have another layer of software to increase the point of failure in our system. It'll be great if irule can handle this.
Thanks.
Kem