.net sdk servers not equal load in cluster
I have 3 couchbase nodes in cluster (m1.large amazon instances) called A, B and C. In my web config I've defined servers for bucket. The load on first node defined in web config is much more than on the others. Also first node have a lot of TIME_WAIT connections. Is that ok?
Here are some graphs. At first node A was first in config, then B became first and A became second.

Couchbase setup has 3 couchbase buckets and 1 memcache bucket. Couchbase buckets used for storing clip views by users with average 0.169 gets per sec. and 0.00269 sets per sec (month stats). Second bucket used for storing messages, conversations between users: 0.204 gets per sec. 0.00534 sets per sec. Last one is used for storing info about online users: 0.00895 gets per sec. 0.442 sets per sec.
All those buckets use both set/get (less) and views (more).
Memcache is used more intensively: 5.68 sets per sec. / 70.2 gets per sec.
I dont know if I understand correctly your question about type of keys, but if you mean keys in views I mostly use complex keys (most in messages bucket). They look like [Int64,Int64,Int64].
Example of one view from messages bucket:
MAP:
function (doc, meta) {
if (meta.type == "json" && doc.type == "msg"){
if (doc.OwnerId == doc.SndrId){
emit([doc.OwnerId, doc.RcptId, doc.Date], {"Date":doc.Date, "OwnerId":doc.OwnerId, "RcptId":doc.RcptId, "SndrId":doc.SndrId, "Text":doc.Text, "Unread":doc.Unread, "id": doc.id, "type":doc.type});
} else {
emit([doc.OwnerId, doc.SndrId, doc.Date], {"Date":doc.Date, "OwnerId":doc.OwnerId, "RcptId":doc.RcptId, "SndrId":doc.SndrId, "Text":doc.Text, "Unread":doc.Unread, "id": doc.id, "type":doc.type});
}
}
}
REDUCE:
function(k,v,r){
if (r){
if (v.length > 1){
var m = v[0].Date;
var mid = 0;
for (var i=1;i<v.length;i++){
if (v[i].Date > m){
m = v[i].Date;
mid = i;
}
}
return v[mid];
}
else {
return v[0] || v;
}
}
if (v.length > 1){
var m = v[0].Date;
var mid = 0;
for (var i=1;i<v.length;i++){
if (v[i].Date > m){
m = v[i].Date;
mid = i;
}
}
return v[mid];
}
else {
return v[0] || v;
}
}Also here is couchbase bucket config:
<cb-messages> <httpClientFactory type="Couchbase.HammockHttpClientFactory, Couchbase" /> <socketPool minPoolSize="16" maxPoolSize="128" connectionTimeout="00:01:00" /> <heartbeatMonitor enabled="true" /> <servers bucket="messages" bucketPassword="ytngbgk" username="Administrator" password="ytngbgk" observeTimeout="00:01:00"> <add uri="http://couchbase-b:8091/pools" /> <add uri="http://couchbase-a:8091/pools" /> <add uri="http://couchbase-c:8091/pools" /> </servers> </cb-messages>
Hello,
Do you mind describing what your application is doing?
- simple couchbase get/set operation?
- queries/views?
Type of keys?
Regards
Tug
@tgrall