HTTP's idempotent feature is causing issues to my website.
My website uses HTTP GET for search functionality. All keyword search requests pass through a set of proxy servers (Content delivery network, Firewall, Apache) and handed over to JBOSS server for processing.
But, If JBOSS takes more than 'XX' seconds to respond, apache (and other proxy servers) sends retry request. This way my JBOSS server is overwhelmed by expensive search requests.
I can not turn Idempotent feature OFF and I already have increased apache 'TimeOut'. I cannot make TimeOut to infinite. Also, I can not change number of retry on other proxy servers.
But still, I want to make sure that my application is fail-proof.
Is there any way to identify that request received by JBOSS is 'retry request' or 'browser request'? If I can identify, I can choose to honor or ignore retry request as per application logic.
Any related information would be helpful.