Don't use a client with failover and you won't have this problem. This means
that you'll get a cache miss when trying to get key k2 when S2 is down
instead of old data.

The downside is that if you have N servers and one is down, then 1/N of all
data is uncacheable, and your primary datastore has to be able to handle the
increased load.

In the end you have to make the decision what's best for your application.


/Henrik

On Wed, Sep 28, 2011 at 13:28, thibd <[email protected]> wrote:

> Dear all,
>
> I am a newbie to Memcached
> I am now feeling difficulte to ensure my app not to get out of date
> data due to this scenario:
> - having one server S1 (with key k1-value1, k2-value2)
> - adding one more server S2, and then "value1" is stored in S1, and
> "value2" is stored in both S1 and S2 (the app just retrives value for
> k2 from S2).
> - "value2" in S2 is updated, and "value2" in S1 will be out of date.
> - S2 down suddenly and then the app will try to get value of key k2
> from S1, it means the out of date data will be used.
>
> I've tried to find out solution from internet but there is not enough
> info. would you please give me some instruction to solve the issue?
>
> Thank all.
>
>
>
>

Reply via email to