Couchbase Load balancing and Apache/PHP load Balancing
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?