I am using the PECL extension of Mongoclient in php, which allows me to connect to a MongoDB on compose.io.
I'm using the standard connection to a remote server:
new MongoClient('mongodb://username:[email protected]:10554,candidate.5.mongolayer.com:10690/database?replicaSet=set-xxxxxxxx');
However, I have read online that connecting to a Unix Domain Socket can give performance boosts of up to 100x. Currently, the connection to compose.io takes about 1,2 seconds, which is quite long.
How can I setup a Unix Domain Socket to connect to a remote MongoDB server?