官术网_书友最值得收藏!

Buckets and servers

You already have an idea about buckets from the first chapter. You can view its features from the web console as shown in the following screenshot:

Bucket overiew

The Buckets section allows administrators to observe read/write operations per second and disk I/O of the top active buckets. The administrator can determine the operation load on buckets from this section.

The Servers section provides some hints on how many nodes there are in the cluster, how many servers have a failed status, and whether there are any servers that require rebalancing after joining the cluster.

The Data Buckets view provides two graphs showing the operations per second and disk fetches per second.

Server nodes

When you click on the Server Nodes tab, you will be shown the system resources usage by all nodes that are part of the cluster. You can expand an individual node and view its details.

System resources by node

You will find a warning that displays on the screen stating that the cluster requires at least two nodes when you configure replication on a bucket. This is obvious since at least two nodes are required in a cluster for replication, one for the active and another for the passive replica.

In this section, the administrator can find the nodes that require rebalancing of data.

Data buckets

The Data Buckets section provides views on data buckets created in the cluster. The administrator can also create buckets and modify its settings using this option.

The Data Bucket view

You can determine the settings of a bucket by expanding it. Let's expand the beer-sample bucket to view its details.

Bucket setting info

You can now view comprehensive details about the bucket. You can also verify whether access to the bucket requires authentication or not. What's more, you can determine the replication factor and configure it for the bucket using this console. You can even perform compaction and defragmentation of disks from this console using the Compact button. More on compaction in Chapter 9, Data Replication and Compaction.

And finally, you can edit the bucket's settings using the Edit button, as displayed in the following screenshot:

Bucket configuration options

Click on the Documents button to view documents in the bucket. You can edit and delete a document using this console. You can even search a particular document using the Document ID, which will be explained later.

The document editor

Most of the time, administrators need to create buckets for each application. This can be done using the Create New Data Bucket button on the Data Buckets tab. Let's now create a new data bucket, as follows:

Bucket creation

Under the Create Bucket window, the administrator needs to add a few details to create a new bucket, as explained in the following:

  • Bucket Settings: Here, the administrator can enter the name of the bucket; let's use MyBucket, in our case. Out of the two options, you can select the type of bucket as Couchbase for the time being.

    Note

    The following are the types of bucket:

    Memcached: This stores documents in the memory only, hence volatile in nature.

    Couchbase: This gives persistence to documents by flushing documents on disks.

    Further details will be provided in the next chapter.

  • Memory Size: Specify the RAM size that needs to be allocated from each node of the cluster for this bucket.

    Bucket creation continued

  • Access Control: There are two options under this—Standard port and Dedicated port. You can choose Standard port and enter the password as Mybucket to secure the bucket when connecting to it from clients.

    Note

    The user ID used to connect to the bucket will be the name of the bucket itself. If you want to make changes to the port number to connect to the bucket using the SDK, you can choose the Dedicated port option and enter the desired port number. Note that the Dedicated port option will not require authentication, and hence, no password!

  • Replicas: If there is a need to store the same document on different nodes, replicas need to be enabled. This can be done by selecting the Enable checkbox.

    Note

    The administrator can configure up to three replicas per bucket. You will get a warning when you have fewer nodes than required for a configured replica. You can also configure the bucket to replicate indexes by selecting the Index replicas checkbox.

    Bucket creation continued

  • Disk I/O Optimization: The administrator can set this option to either Low, which is the default option, or High.
  • Auto-Compaction: By checking this option, you instruct Couchbase to automatically rebuild the stored data and its indexes in order to reduce fragmentation of data.
  • Flush: The administrator can enable this to run the Flush command, which deletes all documents inside a bucket.

    Tip

    Ideally, you should not enable Flush in a production environment so as to avoid accidental flushing. You can enable this option when a temporary bucket is created for an ad hoc requirement.

Click on Create. Now, you can view MyBucket on the console, as shown here:

Bucket overview

主站蜘蛛池模板: 江北区| 屏南县| 新津县| 仁化县| 清流县| 钟山县| 乐都县| 霍林郭勒市| 吉隆县| 彩票| 红桥区| 怀宁县| 浦县| 双桥区| 年辖:市辖区| 彝良县| 富锦市| 诏安县| 金华市| 龙江县| 吕梁市| 新晃| 理塘县| 汉源县| 乐山市| 湾仔区| 林周县| 大悟县| 南安市| 秦安县| 临沧市| 鹰潭市| 霍山县| 应用必备| 嘉义县| 周宁县| 昌都县| 金乡县| 涿鹿县| 凌海市| 松原市|