views:

83

answers:

2

I am designing a website implementation. There are two web server machines and we would like out-of-process global cache provided by Memcached.

I envisage placing memcached on two separate boxes whose sole purpose is to serve the global data cache. Would such an implementation be considered "typical" and would the term "cache server" be appropriate to describe those machines?

+2  A: 

Sounds like you're on the right track. This does sounds like a typical implementation to me.

jamesaharvey
thanks - just wanted a sanity check
Ben Aston
A: 

By saying "I envisage placing memcached on two separate boxes" I hope you dont mean using two servers both having memcached. If so you should divide your caching to these two servers like first server caching data from tables(A,B,C) and the second caching (D,E,F)

Aykut
I do mean that memcached will be installed on each of the two cache servers, forming a "global" application cache. Is there an issue with this approach?
Ben Aston
Two web servers using(connecting to) one memcached server may be sufficient.If the above situation is not the case then you should cache different data on each memcached server. If you cache the same data on both servers then:1. You'll cache the same data in two places. 2. You'll have to refresh the cache in two places when any refresh is needed.3. When cached data gets huge memory will not be sufficient.
Aykut
I thought the idea behind memcached was that it transparently provided a distributed cache, taking care of where data was stored for you... and that by adding a second cache server, cache items would be distributed across the two servers automatically without the client's knowledge. Is this not the case?
Ben Aston
Before you wrote this comment. I thought so. But After reading your comment I googled for this and found a few articles. In the articles I've found it says I was wrong. Memcached transparently handles them it seems. Sorry for wasting your time :/
Aykut