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

Couchbase cluster load balancing

5 replies [Last post]
  • Login or register to post comments
Fri, 09/21/2012 - 07:18
SkeLLLa
Offline
Joined: 06/22/2012
Groups: None

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?

Top
  • Login or register to post comments
Sat, 09/22/2012 - 13:47
ingenthr
Offline
Joined: 03/16/2010
Groups:

The best policy is to change the config to use simply /pools, but if you're using the latest .NET client library it should do that automatically. Which version of the client library are you using?

Top
  • Login or register to post comments
Mon, 09/24/2012 - 03:29
SkeLLLa
Offline
Joined: 06/22/2012
Groups: None

I use the lastest lib, compiled from source.
Here is screenshot:

After red line the second node (called "slave", 10.0.0.2) moved to the frist line in servers config.

Top
  • Login or register to post comments
Sat, 10/06/2012 - 12:25
ingenthr
Offline
Joined: 03/16/2010
Groups:

CPU utilization will always be somewhat uneven as there are some kinds of processing that run in one and only one place. Also, the .NET client does have a 'heartbeat' check that will use a little bit, but generally shouldn't get in the way.

Is this CPU usage getting in the way of any processing?

Top
  • Login or register to post comments
Mon, 10/08/2012 - 00:52
SkeLLLa
Offline
Joined: 06/22/2012
Groups: None

The cpu usage is almost equal when it processing something and idle, because the load isn't so big.

Do you know what frequency this 'heartbeat' check has? I'm asking because something (I don't exactly know what it is) in my web app began eating 100% cpu every 25 seconds. Couchbase lib was updated just that day when it began. Those cpu usage spikes appear even when noone using my app and sometimes they grow (i.e. in the begginning it eats 50% on each core of 8-core cpu and lasts in 1 sec, later it eat 100% on each core for 2 or more seconds). And it disappears only when I recycle IIS app pool. Also when I look through my network activity (on app server), in normal mode (whitout spikes) I saw that app server sends and then receives something over tcp, and when cpu usage jumps to 100% there are multiple "TCP Receive" from couchbase servers in a row without any tcp sending.

Top
  • Login or register to post comments
Wed, 02/06/2013 - 10:44
keromeister
Offline
Joined: 09/12/2012
Groups: None

I'm seeing the same thing on Couchbase 1.8.1 on a 10 node cluster. Node1 has about double the CPU and Load average as the rest of the nodes.

Not sure how to relieve this pressure as its a bit concerning to me. Should i be changing my application configs to stagger the order of the couchbase nodes so they "even" out?

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