Search:

Search all manuals
Search this manual
Manual
Moxi Server 1.7
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
3 Standalone Moxi Component
Chapter Sections
Chapters

3.4. Advanced Standalone moxi Configuration

3.4. Changing the default listening port
3.4. Specifying SASL authentication
3.4. Increased Logging

Some of you may want to run multiple instances of moxi, giving each moxi process special command-line configuration parameters. The simplest way to start moxi completely via the command-line is by passing it one or more comma-separated REST URL's:

./moxi URL1[,URL2[,URLn]]

A per-bucket URL has the form of:

http://<MEMBASE_SERVER>:8091/pools/default/bucketsStreaming/<BUCKET_NAME>

For example, with a bucket named "shoppingCarts": And using more than one Membase server for redundancy:

./moxi http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts
./moxi http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts,http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts

The "Gold Standard" best practice (if you have the flexibility) is to put the Membase host URLs behind a http reverse-proxy, so that all the client-side Moxi's can be more easily configured with a "stable" URL which can handle cluster changes without having to touch each client-side Moxi like..

./moxi http://membase_http_reverse_proxy_host:8091/pools/default/bucketsStreaming/<BUCKET_NAME>

Certain load balancers will close a connection that they have deemed "idle". When a client-side Moxi is connected to Membase's streaming API, there is very little data flowing other than when topology changes occur. Because of this, some load balancers will close the connection which can cause traffic disruptions. It is a best practice to configure the load balancer with an infinite timeout on idle connections for this traffic.

Changing the default listening port

Moxi will listen on port 11211 by default. To change Moxi's listen port, use a -Z port_listen flag:

./moxi -Z port_listen=11311 http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts

Specifying SASL authentication

If your bucket has SASL authentication credentials, you can also specify them using the usr and pwd -Z flags. For example:

./moxi -Z usr=shoppingCarts,pwd=need_a_better_pswd,port_listen=11311 \
    http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts

Increased Logging

To have moxi emit more logging information, you can specify -v, -vv, or -vvv flags (the more v's, the more verbose moxi will be). For example:

./moxi -vv -Z usr=shoppingCarts,pwd=need_a_better_pswd,port_listen=11311  \
    http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts