master server identification
Wed, 09/22/2010 - 14:47
I was reading in the documentation about the run-time flow and was wondering about step 3, or "Membase client hashes KEY, identifies KEY's master server". How is the master server determined, is it via some broadcast protocol?
Also our memcache client is set to use one IP within the membase cluster. What happens if this node is not available? Should we be adding each IP of the cluster to the memcache client constructor?
Thanks!
Thanks for your inquiry Berty.
-A normal memcached client will perform its own hashing and send a get/set to a particular Membase server (or its local Moxi if running a client-side Moxi). This will then be received by Moxi (either on that server or the local one), rehashed and sent to the key's "master server". This identification is based upon a vbucket mapping that is passed to Moxi. The mapping is updated when a node is added or removed from the cluster or a failover is performed. An enhanced "smart client" (such as the Enyim client for .NET) will understand that vbucket mapping and identify the "master server" itself.
-If you are only pointing at one server and it goes down, yes you will have a problem. You can solve this either by giving the client more than one IP of the cluster (could be all, doesn't "have" to be) or by running a client-side Moxi and pointing it at more than one IP of the cluster. The benefits of running a client-side Moxi are that a) you don't have to update the client configuration each time you add/remove/failover a node and b) you eliminate the second network hop of going through a server-side Moxi.
Make sense? Let me know how else I can help.
Perry
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!