4
votes

We are using Couchbase 5.1.1, a cluster of 5 VMs, memcached bucket. I try to understand how memcache bucket work within a couchbase cluster.

Php is speaking memcache directly to couchbase servers (no explicit proxy).

But sometime, I see error: SERVER_ERROR proxy downstream timeout looks like there is a proxy somewhere?

Test with Docker:

  1. docker run --name cb --rm -ti couchbase:5.1.1

Then inside the container:

  1. couchbase-cli cluster-init --cluster localhost --cluster-username admin --cluster-password totototo --cluster-name poc
  2. couchbase-cli bucket-create --username admin --password totototo --cluster localhost --bucket mem --bucket-type memcached --bucket-ramsize 128 --bucket-port 11212

I can see a moxi process now:

> /opt/couchbase/bin/moxi -B auto -z
> url=http://127.0.0.1:8091/pools/default/bucketsStreaming/mem -Z
> port_listen=11212,downstream_max=1024,downstream_conn_max=4,connect_max_errors=5,connect_retry_interval=30000,connect_timeout=400,auth_timeout=100,cycle=200,downstream_conn_queue_timeout=200,downstream_timeout=5000,wait_queue_timeout=200 -p 0 -Y y -O stderr
1
Possible duplicate of Couchbase SDK and Moxi Client - dnault
That error message is coming from Moxi, which routes standard memcached requests to the Couchbase cluster. - dnault
I use a memcached bucket, Moxi should not be enabled here, isnit? Or maybe Moxi is here because the cluster? - Thomas Decaux
Moxi is one of the underlying server processes that make up Couchbase Server. if I understand the 5.0 release notes correctly, server-side Moxi is deprecated, and users are encouraged to use Couchbase client SDKs (or client-side Moxi if using a Couchbase SDK is not possible). - dnault

1 Answers

1
votes

Actually yes, before Couchbase 5.5.X:

a moxi process is run as soon as a memcached bucket is created.

After and at 5.5.X:

no more moxi proxy, you can run moxi or configure application to distribute data over the cluster