Hust be careful with varnish and serving big files. I have 3 varnish servers which die when serving big files (200+MB installers) with no previous warning. It's a known issue.
On Fri, Aug 28, 2009 at 7:10 AM, pub crawler <[email protected]>wrote: > Slowly proceding on our Cherokee + Varnish + Coldfusion + Railo setup. > > Stuck on perfecting the working regular expression needed to complete > things. I have a semi working regular expression, that allows me to > request a .cfm file - but it fails to work when anything comes after > the .cfm. So begging of the collective intelligence here to dig the > regex out of their mind or experience. :) Fairly sure same regular > expression is/will be needed by others. > > Simply this - need a regular expression to detect when we have a > Coldfusion file in a URL: > .cfm > > I have a big URL like this- (see the .cfm in there :) ? ): > > http://images.pubcrawler.com/dsp_test_img.cfm?file=687474703A2F2F6661726D342E737 > > This regular expression is for Virtual Server in Cherokee. When > Cherokee detects .cfm in URL it's processing I want it to fire off via > reverse proxy to another application server. At this point a request > is nested so need a regex to get this working: > > INET -> Cherokee port 80 -> Varnish port 81 -> Cherokee port 82 -> > regex .cfm point to 127.0.0.1:8080 (Railo app server) > > The reason for the nesting if you are interested :) is simple. > images.pubcrawler.com is behind Cherokee and Varnish is behind there. > The files are all cacheable static images, css, etc. We have some > elements that are per se static but are remote files we end up > grabbing over and over daily and we have no control of when remote > partner servers go offline. So I've wrote up a simple set of code that > encodes URL values and spits out nice number letter strings as URLs. > Additionally, it fires off to get the binary data. After it does that > once Varnish will be holding it for our defined amount of time so no > more duplicative requests during peak times. > > A request currently for such a defined file might be something like: > <img src="http://www.cherokee-project.com/static/indiankid.png"> > > Now when this is done (yep long URL, but it's cheap and fast and > portable/reliable URL value) > <img src=" > http://images.pubcrawler.com/dsp_img.cfm?file=687474703A2F2F7777772E636865726F6B65652D70726F6A6563742E636F6D2F7374617469632F696E6469616E6B69642E706E67 > "> > > Thanks to everyone who takes time to read this. Open to the regex or > any other workaround suggestions. > > Everyone should look into using Varnish if you have a good amount of > static content or just as another cache layer to speed things up. > 90.81% hit rate for us currently. > _______________________________________________ > Cherokee mailing list > [email protected] > http://lists.octality.com/listinfo/cherokee >
_______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
