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

Couchbase Load balancing and Apache/PHP load Balancing

2 replies [Last post]
  • Login or register to post comments
Sat, 02/23/2013 - 07:41
costantinos
Offline
Joined: 02/23/2013
Groups: None

Dear All,

I have setup couchbase 2.0 onto 11 Ubuntu servers. There is one Ubuntu Server with HAProxy 1.4.18 as a load balancer in front of the couchbase cluster with the eleven servers. On each server I have configure an apache server with some php script that call a spatial query to localhost of each server. When I tested the server with 1000 concurrent request all the couchbase server (and service) were down. Each server has 4GB Ram and 2 cores.

Then I decided to query one server of the cluster instead of all of them so instead of calling a spatial query to the localhost of each couchbase server I was calling the query to a specific one. As a result, all the couchbase servers were down as before.

The php script is sorting 1000 users based on a calculated distance so there is a computation cost on each apache server. I am not using the php’s sdk but instead I call the spatial query with curl command.
What is the best configuration for the couchbase cluster so i can have the best performance of the eleven servers in a couchbase cluster?

Thank you,
C.

Top
  • Login or register to post comments
Wed, 02/27/2013 - 12:26
tgrall
Offline
Joined: 09/05/2012
Groups: None

Hello,

You should not use a HA Proxy between Couchbase Server and its client. The PHP SDK Is responsible of balancing the load and data on the different nodes (and also allow you to change the topology of your cluster on a live system)

You can using the latest PHP SDK and connect to the cluster using the http://server:8091/pools right? (list of some servers in your cluster)

Regards

__________________

Tug
@tgrall

Top
  • Login or register to post comments
Wed, 02/27/2013 - 13:03
costantinos
Offline
Joined: 02/23/2013
Groups: None

Hello,

Thank you for your response.
Does the PHP SDK support spatial view? I used curl command instead of SDK because I didn't find a way to get the data from spatial view through the sdk.

Thanks in advance

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