What is Couchbase ?

Couchbase is a document and key- value based NoSQL database. The couchbase, which operates on the cluster architecture, can distribute data on many nodes. The data on the node is primarily processed in memory and also writes to the disc to be consistent. In the Oracle database, the transaction is expected to be completely finished, but in Couchbase, after writing the, data consistency is ensured. Queries and updates running in Couchbase are primarily made on memory so that data can be accessed quickly.

Architecture

Couchbase uses an elastic architecture to increase resource utilization and balance workload. The most classic method for this is to distribute the main services used to different nodes.

These services are;

Data Service: Supports the storing, setting, and retrieving of data-items, specified by key.

Query Service: Parses queries specified in the N1QL query-language, executes the queries, and returns results. The Query Service interacts with both the Data and Index services.

Index Service: Creates indexes, for use by the Query and Analytics services.

Search Service: Create indexes specially purposed for Full Text Search. This supports language-aware searching; allowing users to search for, say, the word beauties, and additionally obtain results for beauty and beautiful.

Analytics Service: Supports join, set, aggregation, and grouping operations; which are expected to be large, long-running, and highly consumptive of memory and CPU resources.

Eventing Service: Supports near real-time handling of changes to data: code can be executed both in response to document-mutations, and as scheduled by timers

Data

Data in Couchbase is stored in logical structures called Bucket. While data stored in tables in relational databases, the couchbase is also stored in the bucket provided. With Bucket, data storage types can be made with three different types of buckets. These are couchbase; writes data to both memory and disk. Memcached writes data to memory only. Ephemeral keeps data temporarily in memory. Couchbase uses the N1QL (Nikel) query language, which is very similar to other SQL languages as the query language. In Couchbase, our documents are kept as Json.

You can show it as Table, Tree, Plan and Plan text.

Replication

In Couchbase, buckets are divided into two as activated and replica. Replicas are backups of active buckets. Bucket replicas are located on a different node. If the node is not accessible, the replica on a different node will be active. When the node is up again, its replicas are running again in different nodes and no data loss occurs. All these operations are done automatically by couchbase. This process is called Rebalance.

You can determine the number of replicas either when creating the bucket or editing bucket after created it

Replica of bucket, node and cluster can be taken. With the method called XDCR (Cross Data Center Replication) for server replicas, you can create a replica of your cluster that is active in a data center in a different location. Thus, if a problem occurs in the actively used datacenter, it can be continued to work from datacenter in a different location. Clusters in two different locations with XDCR keep each other’s replication.

Couchbase internal XDCR connectors; Elasticsearch, Hadoop, Kafka, Spark, Talend, SQL (ODBC/JDBC)

Couchbase management can be run via WEB UI, REST API and Command Line. Especially the use of web ui is quite simple and straightforward. You can make many operational transactions and queries through ui.

Node, service and buckets can be monitored from this interface.

Port 8091 is used to access the interface. You can login to the interface with http: // localhost: 8091

Related Post

One thought on “What is Couchbase ?

Leave a Reply

Your email address will not be published. Required fields are marked *