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.
There two kinds of bucket types: membase type and memcached type.
Membase Type Bucket
A Membase type bucket allows for persistence and optional replication.
Hashing items to a membase type bucket in a cluster is via vbucket hashing.
Memcached Type Bucket
A Memcached type bucket is memory-only, non-replicated, and tuned for distributed memory object caching. In particular, a memcached type bucket is allowed to and expected to evict items from memory when the memcached bucket (memory resource quota) gets full.
Hashing items to a memcached type bucket in a cluster is via ketama consistent hashing.
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.
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.
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.
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.