launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04121
Re: memcache, responsiveness and load {short story, lets turn memcache off}
On Thu, Aug 5, 2010 at 2:27 AM, Jeroen Vermeulen <jtv@xxxxxxxxxxxxx> wrote:
> On 2010-08-04 19:10, Robert Collins wrote:
>
>> For clarity, I'm proposing removing all the uses of it that users are
>> noticing (and thus complaining about) - not removing the facility from
>> the datacentre: memcached is a good tool and its good that we have it
>> available.
>
> If the main problem is "user changes something but doesn't see the change
> reflected in the page," that's the same problem we have with replication
> lag. Couldn't we solve that in the same way, by having a user bypass
> memcached for a while after a POST?
We could, yes. It would be an interesting experiment, and we could get
an overall measurement of the downside by comparing the cache hit
rate.
It wouldn't be a large hack - just make all IMemcacheClient.get
requests fail if there has been a POST in the last x seconds (10
seconds? Good a guess as any - I would go for 5. Although we might
have to go for 5 + hard_timeout depending on how the plumbing fits
together). It will not solve the problem, but it might hide it to the
extent of making it unnoticeable at the cost of our cache hit rate.
> (Yeah, I know, slower pages. But set the duration of that special state to
> 10 seconds and have memcached invalidate after 10 seconds, and we'll still
> get effective "slashdot protection" while hiding all unwanted caching
> effects at minimal cost to the user.)
--
Stuart Bishop <stuart@xxxxxxxxxxxxxxxx>
http://www.stuartbishop.net/
Follow ups
References