Couchbase PHP SDK - Persistent Connections
We are currently looking to deploy Couchbase for a high traffic large site.
Everything is working with no issues - however across the set-up we are seeing network issues between our php-fpm server and the Couchbase servers.
This largely seems to be caused by each php thread creating a new connection to (1) server:8091 and then (2) server:11210.
Reading the documentation:
22.214.171.124.1.1. Performance Considerations Note that calling new Couchbase($url) will make a REST call to Couchbase Server to determine the cluster topology. This is a relatively expensive call and that's the reason why we use persistent connections by default, so that this call doesn't have to be made more often then necessary, and most importantly not on every user-request. That means, if you have any code that calls new Memcached(); in a tight loop, you want to move the call to new Couchbase(); to outside of that loop. If you compare performance between ext/memcached and ext/couchbase and find ext/couchbase to run at 1/2 the speed of ext/memcached, look for places where new Couchbase(); is called in a loop or otherwise repeatedly.
I have read this several times - and it seems to be saying that ext/couchbase will maintain connections - and have them persistent.
This is a relatively expensive call and that's the reason why we use persistent connections by default, so that this call doesn't have to be made more often then necessary, and most importantly not on every user-request.
My initial question is - does the PHP SDK use persistent connections across user requests?
e.g. for every HTTP request that goes through to php-fpm should there be calls to the cluster on 8091 and then specific server on 11210?
I can not decide if I am reading the documentation wrong - of if I have got something configured wrong.