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

PHP and client side moxi

1 reply [Last post]
  • Login or register to post comments
Wed, 11/14/2012 - 09:34
bogdan.albei
Offline
Joined: 11/14/2012
Groups: None

Hi all,
I'm trying to use a client side moxi to connect to a cluster with PHP, but it doesn't seem to work. I am connecting fine to the servers individually by using the following code:
$couch = @(new Couchbase( 'serverX:8091' ] ));

I am trying to connect to the local moxy by using this:
$couch = @(new Couchbase('localhost:11211' ));

It doesn't seem to work. The moxi is listening locally, but when I telnet into it on port 11211 I get disconnected straight away:
telnet localhost 11211
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

Also, I tried to connect to the remote servers on ports 11210 or 11211 to the default bucket and it doesn't work. Am I missing something here?
I'm using the latest enterprise version 1.8.1

Top
  • Login or register to post comments
Wed, 11/14/2012 - 10:42
mikew
Offline
Joined: 03/14/2011
Groups:

You don't need to use client side moxi with the php client. The reason that we have moxi is for clients that don't know what the cluster topology looks like. This means if you have an existing application that uses memcached and that application doesn't use one of the Couchbase supported SDK's then it likely needs moxi to help forward requests.

The Couchbase clients on the other hand take care of this for you by communicating with the cluster so that it can understand the cluster topology. You should just connect to one of your servers with the first example you have posted and the client will properly route requests and also see when nodes are added and removed.

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