Skip to content
shish edited this page Jan 16, 2012 · 12 revisions

Varnish makes everything better. The default behaviour of "anons see cached pages that are up to two minutes old, logged in users get fresh data" is pretty close to perfect, though you may want to increase the TTL for some pages (image lists / search results may change often, individual images not so much)

In config.php, define("SPEED_HAX", true); will enable a bunch of potentially risky optimisations (the main risk being that users see out-of-date data; for example, in speed hax mode the giant tag cloud will be generated once and saved to disk, and the tag cloud will stay the same until the cached version is cleaned by hand)

If serving images and thumbs from a set of mirrors, one can load balance by setting eg the image url to http://mirror-{1,2,3}.mysite.com/_images/$hash/$id - $tags.$ext. Shimmie will then spread the load over those three servers, using a consistent hash for distribution (consistent meaning that if you add or remove a server from the list, as many URLs as possible will stay the same)

Clone this wiki locally