I have a ruby on rails application that uses varnish (as a reverse proxy) in front of it. I use apache tomcat as my web server. 80% of requests coming to tomcat via varnish are returning 304 Not Modified, whereas varnish returns 200 OK for these requests.
Upon reading about when the 304 code gets returned, I learnt that, it happens when the request header has "If-None-Match" (whose value is set to ETag header value, previously returned by HTTP response for the same request) or "If-Modified-Since" As my response sizes are very less, I would like my tomcat to skip/ignore these headers and pass the request to my Rails application for handling.
Currently, the time taken by Tomcat to compare the ETags is more than the time taken by my Rails application to respond. Hence, it is not adding any value to my app's performance.
Any help would be greatly appreciated. Thanks in advance!!
Aucun commentaire:
Enregistrer un commentaire