Manage Buckets

    +
    Buckets, which clusters use to store data, can be created, edited, and deleted.

    Accessing Buckets in the Couchbase Cloud UI

    Buckets can be viewed and managed under a cluster’s Buckets tab. A summary of all the buckets on the cluster is displayed in table format.

    A cluster’s 'Buckets' tab showing a table of multiple buckets.
    Permissions Required

    In order to access buckets in the Couchbase Cloud UI, the following permissions are required:

    • You must have Project View privileges for the project that contains the cluster.

    Buckets Summary

    A cluster’s Buckets tab shows a summary of all the buckets on the cluster. The summary is displayed in table format, with sortable columns and a row for each bucket.

    The buckets summary displays the following information about each bucket:

    Name
    Items
    Ops/sec
    Memory Used
    Disk Used

    A Trash icon is displayed at the end of each row, which can be used to delete the bucket.

    Create a Bucket

    To create a bucket, you must have Project Edit privileges for the project that contains the cluster on which you are creating the bucket.

    1. Go to the cluster’s Buckets tab.

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that you wish to add a bucket to.

        This opens the cluster with its Overview tab selected.

      3. Click the Buckets tab.

    2. Click Add Bucket.

      This opens the Add Bucket fly-out menu.

    3. Specify a name for the bucket.

      In the Bucket Name field, enter a name for the bucket. A bucket name can only contain lowercase letters a-z, numbers 0-9; with the addition of the underscores, periods, and dashes; and can be no more than 100 characters in length.

    4. Specify an appropriate memory quota for the bucket.

      In the Memory (MB) field, enter the amount of memory that is to be allocated to the bucket. (A minimum of 100 MB is required.)

      The Memory allocation graph shows the total amount of memory in the cluster that can be allocated to buckets. The amount of memory that is Selected for the current bucket can’t exceed the amount of Available memory.

      In Couchbase Cloud, the amount of memory that you specify for a bucket gets evenly divided across all Data Service nodes in the cluster. Should the number of Data Service nodes in the cluster change in the future, the total amount of memory allocated to the bucket will remain the same — it will just get re-divided across the new number of Data Service nodes.

      Note that this behavior is different than the traditional memory quota model in Couchbase Server. In that model, the amount of memory you specify gets allocated on each Data Service node individually, and the total amount of memory allocated to a bucket goes up and down whenever a Data Service node is added or removed from the cluster.

    5. Choose the conflict resolution method for the bucket.

      Use the Conflict Resolution drop-down menu to select the method of conflict resolution that should be used for the bucket.

      A conflict occurs during XDCR, when a document has been modified in different ways in different locations; necessitating that one of the versions be chosen for retention, and the other discarded. There are two methods for making this choice: Sequence number and Timestamp. The method you choose is permanently established for the bucket — it cannot subsequently be changed. For information on the significance of each method, refer to XDCR Conflict Resolution.

    6. Once you’re satisfied with the bucket configuration, click Save.

      Once the bucket is successfully created, it will appear in the bucket summary table.

    After creating a bucket, certain settings can still be changed by modifying the bucket.

    Modify a Bucket

    You can modify a subset of the settings already established on an existing bucket.

    To modify a bucket, you must have Project Edit privileges for the project that contains the cluster whose bucket you wish to modify.

    1. Go to the cluster’s Buckets tab.

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that contains the bucket that you wish to modify.

        This opens the cluster with its Overview tab selected.

      3. Click the Buckets tab.

    2. Find and click on the bucket that you wish to modify.

      This opens the bucket’s fly-out menu.

    3. Edit the bucket’s settings.

      You can edit the following bucket settings:

      Memory (MB)

      Edit the amount of memory allocated to the bucket. (A minimum of 100 MB is required.)

      Note that if you decide to lower this setting, the value you specify cannot be lower than the amount of memory currently being used by the bucket on any of the nodes in the cluster.

    4. Once you’ve made the desired changes to the bucket’s settings, click Save.

    Delete a Bucket

    Bucket deletion may be appropriate either when an existing bucket is no longer needed; or when all items within an existing bucket need to be replaced — and bucket-deletion (followed by bucket-recreation) is determined to constitute a faster process than the deletion of each individual item.

    To delete a bucket, you must have Project Edit privileges for the project that contains the cluster whose bucket you wish to delete.

    If the bucket is the source of a replication, then the bucket will fail to be deleted. All replications for which the bucket is the source must be deleted before the bucket itself can be deleted.

    If the bucket is the destination of a replication, the bucket is allowed to be deleted. Any replications for which the bucket is the destination are automatically deleted after the bucket itself is deleted.

    1. Go to the cluster’s Buckets tab.

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that contains the bucket that you wish to delete.

        This opens the cluster with its Overview tab selected.

      3. Click the Buckets tab.

    2. Find the bucket that you wish to delete, and click the Trash icon at the end of the row on the right side.

    3. When prompted to confirm the deletion, click Confirm.

    Upon successful deletion, the bucket and all its data are deleted from the cluster.