10 Node Cluster for PHP App, is the setup right?
Hi guys,
I am setting up a 10 node cluster and want to check with you if I am on track and doing everything right.
- 10 node cluster
- only Memcached bucket type (I use it as a cache, I do not need replication/persistency)
- 24 GIG of RAM for each node, totals to 240 GIG
- using the new Couchbase PHP Smartclient (based on C libcouchbase)
- using standard port (sasl auth) but no password
- my php constructor looks like: $client = new Couchbase('127.0.0.1:8091', '');
- everything is working
My questions:
- is port 8091 the right one? I saw different ports in the documentation
- is the ip the right one? all my php scripts run on the same nodes as couchbase does
- how is "smart" implemented? I got the concept of the vbucket map but how is it beeing handled since php is "stateless"?
- if my php scripts would run on different nodes than couchbase I guess I could not connect to 127.0.0.1, which IP would I use then? Just one from the 10 nodes? What if this nodes fails, then I am out of luck if the vbucket cache is not kept between requests (how would he know what to do)?
Thanks for your help! :)
Stefan
Port 8091 is correct.
Smart is handled here by doing ketama consistent hashing against the nodes in the cluster. If you add or remove a node, it'll change the server list to match the new topology.
You can pick any one of the 10 nodes to bootstrap from. See the wiki for a PHP snippet on how you can make your client library resilient to failures.