Search:

Search all manuals
Search this manual
Manual
Membase Manual 1.7
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
6.2 Best practices
Chapter Sections
Chapters

6.2.4. Data partitioning with buckets

6.2.4. Bucket Types
6.2.4. Accessing Buckets
6.2.4. Standard Port (11211)
6.2.4. Dedicated Ports
6.2.4. Default Bucket

Membase allows you to partition your data into separate containers or namespaces. These containers are called 'buckets'. Membase will keep item storage separated for different buckets, allowing you to perform operations like statistics gathering and flush_all on a per-bucket basis, which are not workable using other techniques such as simulating namespaces by key-prefixing.

Bucket Types

There two kinds of bucket types: membase type and memcached type.

Accessing Buckets

Client may access buckets by connecting to the Membase server running on a host and port. There are two kinds of ports: standard (11211) and dedicated. Each buckets is configured to be accessible either via the standard port or via a dedicated port.

Standard Port (11211)

The standard port is TCP port 11211. When a client first connects to the standard port, the client connection is assigned to use the 'default' bucket (see below). A client may use a SASL authentication command to switch the connection to a different bucket.

Any bucket that you create that's configured to run on the standard port will only be accessible through a SASL authentication client request, which means you must use the binary memcached/membase protocol from your client instead of the ASCII memcached/membase protocol.

Dedicated Ports

A bucket may instead be created to be accessible on its own, dedicated TCP port number. This can be any unused port number (usually larger than 8000), such as 11212, 11213, etc. Each additional bucket configured on a dedicated port number must use its own port number.

When a client connects to a server on a host and dedicated port number, it may use either memcached/membase binary or ASCII protocols, and SASL authentication is not required.

Default Bucket

The bucket named 'default' is special, in that it will always run on the standard port 11211, and it will be the bucket that all clients connecting to port 11211 will initially be assigned to use, until the client performs SASL authentication to switch the client's connection to a different bucket.

The initial configuration screens of Membase will lead you through the configuration of the "default" bucket.

You can delete the default bucket, in which case all clients will need to either SASL authenticate after they connect to the standard port. You may also re-create another bucket named 'default', if you wish, at a later time, and that re-created 'default' bucket will be a standard port accessible bucket.