Forum Discussion
properly return 304?
Hi, folks, I know this looks "f5-irrelevant" but bear with me a moment.
Problem: Database getting pounded on app cache rebuild
Symptom: Too many connections to database
Desired solution: To have the F5 return a properly crafted 304 response so that the caller understands that his request has not changed, based on a URI, which is taken from an external data file, presumably type "String"
in v9 and v10, I need help on:
* writing a properly crafted 304 response
* constructing an external data file and an iRule that makes use of this data file; if the DB is overloaded, I want the data file to contain a universal match, while if the DB is not overloaded, I want the data file to contain a string that is not likely to match, because in the iRule, if the incoming URI matches the class lookup in the file, it is to send out the properly crafted 304, while if there is no match, the request is simply passed through.
[This was previously listed as "need to test for the existence of a file". Ostensibly it would be cool just to have it send back the content of a file if it exists but not to error out if it DOESN'T exist.]
Signed,
One Very Confused iRule Student.
- I need a directive that will let me test for a file
- Greywolf_99040NimbostratusGood Day, Kurt, thanks for your reply. It occurred to me that I was not succinct in what I needed, even in my own mind. I have tried to restate the problem as it lies, in hopes it will make more sense.
- Patrick_Chang_7Historic F5 AccountiRules do not have access to the file system. However, they do have access to external data groups. You just have to have another process that can write to that file on the F5 system. Please keep in mind that the format of this external data group must be correct and that it has changed between version 9 and version 10 of F5's code. As for constructing a proper 304 message:
- Greywolf_99040NimbostratusPatrick, thanks, yes, I get all that; however, just placing the following iRule [for testing a 304 response] does not work -- I get "Web page not available"
- Michael_YatesNimbostratusHi Grewolf,
when HTTP_REQUEST { HTTP::respond 403 }
Recent Discussions
Related Content
* 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