The place where we tend to use a lot of multi-gets is when we're rendering
something like a page that has comments from a lot of users on it and we
want to get the cached data for every one of those users who has commented,
for example.
Also, some clients (e.g. the Spy client for Java) actually do optimization
and collapse multiple gets to the same server into a multi-get.

On Fri, Aug 21, 2009 at 1:10 PM, Bill Moseley <[email protected]> wrote:

> I've often seen comments about using multi-gets for better performance.
> First, I'm a bit curious if/why it's a big performance gain.
> Obviously, not all keys will be on the same memcached server in a multi-get
> request.  Can somoene give me the one short explanaition or point me to
> where to learn more?
>
> I'm perhaps more curious how people use multiple gets -- or really the
> design of an web application that supports this.
>
> I've tended to cache at a pretty low level -- that is if I have a method in
> the data model to fetch object "foo" I tend to check the cache, if not found
> then fetch from the database and save to memcached.  As a result we can end
> up with a lot of separate memcached get requests for a single web-request.
> This is less true as the app becomes more web2.0-ish, but still happens.
>
> So, I'm curious about the design of an application that supports gathering
> up a number of (perhaps unrelated) cache requests and fetch all at once.
> Then fill in the cache where there are cache-misses.  Am I misunderstanding
> how people use this feature?
>
>
> --
> Bill Moseley
> [email protected]
>



-- 
awl

Reply via email to