accesing buckets issue
Wed, 01/04/2012 - 06:28
I have 1 issue..
I have 2 server.. server-1 and server-2 in a cluster.
I am preparing a membase bucket name Test in server-1.
My question is
1)Why Test bucket is also visible on server-2
2) why if i put 1 object on server-1 Test bucket and get that from server-2 Test bucket I can also able to get it ?
Please this is very quick.
Thanks in advance.
1) A bucket is just a database and in Membase/Couchbase we distribute that database across your entire cluster. This is what allows our database to scale up and down.
2) Since the database exists across your entire cluster the hashing algorithm will determine which server you object gets put on. We also have a proxy server that sits on port 11211, which is probably the port you are talking to. The proxy knows about all of the nodes in your cluster so even if you ask the wrong server for your object the proxy server will direct it to the correct one. So whether you ask server 1 or server 2 for the object they both know how to find it even if one of them doesn't contain the value.