On Wed, Oct 14, 2009 at 3:38 PM, Ross J. Reedstrom <reeds...@rice.edu> wrote: > On Wed, Oct 14, 2009 at 02:20:50PM -0400, Benji York wrote: > We're actually set up w/ squid in front of the zope FEs, using IPC to > talk to them all. The default behavior is just to respond w/ a "CACHE > MISS" and use network access timings to select. This is non-optimal, > since it does little true load-balancing, until the FE is completely > hammered (very non-linear response-time curve). I'd love to see an > example where someone replaced the default response w/ something more > meaningful.
You'd probably be interested in the last four paragraphs of http://benjiyork.com/blog/2008/03/icp-for-faster-web-apps.html. > The shoal that replying "HIT' for ZEO cached data breaks on > is that the IPC request contains a URL, not ZODB object refs. And > converting one to the other is what the whole dang machine _does_. Right, but in many situations you can guess effectively. See below. > And you have very little time to answer that IPC query, lest you destroy > the gains you hope to get from having a hot-cache. So some ad-hoc > approximation, like keeping the last couple hundred URLs served, and > responding 'HIT' for those, might get some part of the benefit. I'm thinking about something more specific. For example, lets say that your data is a dictionary application and URLs are of the structure: my-site.com/WORD, where word is the word you want to show the definition of. If you generate an IPC HIT if the process has served a word beginning with the same letter recently, then particular letters will begin to be associated with particular servers, increasing the ZEO (and ZODB) cache hit rates. If you take this a step further and design your app so that you load all the words that start with a letter as one giant object, you'll get an even greater effect. (Note that in real life that object would be too giant, but you get the idea.) > This is probably the wrong list for it, but does anyone know of a > published example of replacing Zope's default icp-server response? Last > time I looked, I couldn't find one. Other than my blog post and zc.icp the only other ICP and Zope info I know of is http://www.zope.org/Members/htrd/icp/intro (very old). Note that I haven't used zc.icp in a long time because we decided to move away from ICP and (eventually) move to a load balancer that implements our desired policy instead. -- Benji York Senior Software Engineer Zope Corporation _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev