Couchbase cluster load balancing
Hello. I'm running Couchbase 2.0 beta on 2 linux instances. For accessing couhbase I use .net api. In it's config I set both server urls:
<cb-bucket1> <httpClientFactory type="Couchbase.HammockHttpClientFactory, Couchbase" /> <servers bucket="bucket1" bucketPassword="qwerty" username="Admin" password="qwerty"> <add uri="http://10.0.0.1:8091/pools/default" /> <add uri="http://10.0.0.2:8091/pools/default" /> </servers> </cb-bucket1>
I've got some buckets that configured in same way.
So on the first server (10.0.0.1) CPU usage is much greater. Load average 2-2.5 times larger. Also 10.0.0.1 was firs node in cluster (so I think it is master). When I change servers order in config 10.0.0.2 cpu usage increased and now cpu utilization on both instances almost equal.
I've got several questions:
- What is better: master node first, or "slaves" first to equalize cpu load?
- Is this behavior connected with couchbase or it's connected .net library?
- Is it possible to use something like round-robin for those requests, to equalize cpu load of all cluster nodes?