I want to setup a memcached cluster for my PHP app on Ubuntu Natty. I want to setup a 4-node cluster.

I know I can install memcached like so apt-get -y install memcached libmemcached-dev or via source with something a little longer. However, when I've done this on the four seperate nodes, I don't know what I need to do to cluster them. Is there a configuration file I'm supposed to edit and what settings do I need to update?

I've googled 'memcached clustering' but I can't seem to find anything definitive.

I'd appreciate some assistance.

Thanks in advance

有帮助吗?

解决方案

Memcached clustering happens at the application layer. Your app will need to figure out on it's own which server to talk to. Each memcached server is configured completely independently. The PHP Memcached library can handle the clustering.

其他提示

If you want clustering capability with memcached you can also take a look at Couchbase. If you install Couchbase on your 4 nodes and select to use the memcached bucket you can cluster all of the servers together through the Couchbase web interface. Couchbase also gives you some monitoring tools that ou don't get with standard memcached.

Memcached per se don't have clustering ability, it is libmemcached that can use multiple memcached instances. In libmemcached library you have API for adding memcached instances. That is just what you need:

memcached_server_push()

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top