key expiration for many memcached clients and DB stress

Peter Van Dijck petervandijck at gmail.com
Fri Oct 20 11:48:32 UTC 2006


You could just get more db servers and load balance them. Or optimize
your queries/tables.

Peter

On 10/20/06, Victor Gumayunov <gva at reamdaysoft.com> wrote:
> Hello everybody,
> please advise how to solve our problem.
>
> We're using memcached in our web project.
> The site is actually a frond-end to some database.
> Since number of users is very high, we cache DB info in memcached.
> But when some memcached key expires, many users simultaneously rush to
> the DB server stressing it to the edge.
>
> Obvious solution is to notify in some way 1 web client that certain key
> is about to expire, so the client re-fetches it from DB and updates in
> memcached, while other clients still use cached value until it is
> updated by notified client.
>
> We tried several client-side approaches to implement this scenario,
> but no one gives 100% good result.
>
> So we changed server's logics for key processing.
> Our modified memcached recognizes specially formatted key names
> and does what I described above (formatted key name contains
> various parameters for such a behavior).
>
> This works almost well, but now we (of cause) run into expected
> problem that our memcached server cannot be updated when new
> memcached version is released.
>
> Can you advise how to solve our problem (key expiration for many
> memcached clients simultaneously, which causes DB stress) without
> patches and various complicated client-side tricks?
>
> Thanks in advance.
>
>


-- 
Find 10000s of videoblogs and podcasts at http://mefeedia.com
my blog: http://poorbuthappy.com/ease/
my job: http://petervandijck.net


More information about the memcached mailing list