Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

.net sdk servers not equal load in cluster

2 replies [Last post]
  • Login or register to post comments
Wed, 01/30/2013 - 02:01
SkeLLLa
Offline
Joined: 06/22/2012
Groups: None

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. network A network B CPU A CPU B

Top
  • Login or register to post comments
Wed, 01/30/2013 - 10:26
tgrall
Offline
Joined: 09/05/2012
Groups: None

Hello,

Do you mind describing what your application is doing?
- simple couchbase get/set operation?
- queries/views?

Type of keys?

Regards

__________________

Tug
@tgrall

Top
  • Login or register to post comments
Wed, 01/30/2013 - 16:24
SkeLLLa
Offline
Joined: 06/22/2012
Groups: None

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>

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker