We use caching appliances in front of our public-facing websites. There are two general approaches: 1) let ML specify the expiration date of the content in the response, which requires logic in the rewriter to set the appropriate headers, and 2) set default cache rules on the cache appliance itself and don't make any changes to the rewriter.
Both approaches have been successful. I like #2 because you can set a default for everything (*) which might be fairly short, and then set longer default times on certain sections or urls, like 6 hrs on anything under "/assets/" etc. This allows us to field pretty much all traffic from the cache appliance except searching and personalized content, which really minimizes the load on the ML server, but at the same time keeps the content fairly fresh. And we don't have to code in any cache logic in ML or clear caches on the cache appliances. > From: [email protected] > Date: Mon, 21 Feb 2011 07:25:05 -0700 > To: [email protected] > Subject: Re: [MarkLogic Dev General] caching server in front of MarkLogic > > It's a good idea for static content: save the MarkLogic CPU cycles for more > important work. > > Another idea is to configure a completely separate http server for static > content (for example, ebay serves static content using ebaystatic.com). You > can take this approach one more step by uploading your static content to a > CDN (http://en.wikipedia.org/wiki/Content_delivery_network). > > If you do this, I recommend including versioning in your static paths. For > example, you might refer to a css as 'screen-20110221T01:23:45.css' rather > than 'screen.css'. That way when an update to the css arrives, you can update > the versioned part of the path and so clients will no longer try to use the > older, cached versions. > > -- Mike > > On 21 Feb 2011, at 05:38 , Jakob Fix wrote: > > > Hi, in preparation of a go-live of a MarkLogic-based application, I've > > been advised to use a caching server (such as nginx or squid) in front > > of MarkLogic's own web server. As far as I understand, the interest of > > such a server is to have them serve static content (javascript, > > images, css) while dynamic content will be handed over to and served > > by MarkLogic. > > > > I would be interested in people's experience with either one server, > > and possibly configuration files used in conjunction with MarkLogic. > > > > Thank you, > > Jakob. > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
