Latest Couchbase DBA Interview Questions and Answers (01)

Different types of buckets in Couchbase?

Different types of buckets in Couchbase: Couchbase, Ephemeral, and Memcached.

Couchbase buckets: These store data persistently(on disk), as well as in memory. They allow data to be automatically replicated for high availability, using the Database Change Protocol (DCP);If a Couchbase bucket’s RAM-quota is exceeded, items are ejected. 
Ephemeral buckets: These are an alternative to Couchbase buckets, to be used whenever persistence is not required: for example, when repeated disk-access involves too much overhead. This allows highly consistent in-memory performance, without disk-based fluctuations. It also allows faster node rebalances and restarts.
Memcached buckets are not persistent on disk: they only exist in RAM. 
For all bucket types, items are selected for ejection by means of the Not Recently Used (NRU) algorithm

What are the different types of services, Couchbase Server provides?

Data Service, Index Service, Query Service, Search Service(Create indexes specially purposed for full text search), Analytics Service(supports join, set, aggregation, and grouping operations), Eventing Service(supports near real-time handling of changes to data) Service

What is the format in which the data is saved in the Couchbase server?

Data is stored in Couchbase as documents. Documents get stored in the JSON document format without any predefined schemas. We can also have binary documents as well.

Can we have tables or schemas in Couchbase?

As of Couchbase 6.5, it does not have tables & schemas. It is schemaless and has JSON documents.

What is XDCR (Cross Data Center Replication)?

Cross Datacenter Replication (XDCR) provides an easy way to replicate data from one cluster to another, between two datacenters/cities/regions/etc. The clusters are regularly used for multiple, geographically diverse datacenters either for disaster recovery or to bring data closer to users for faster data access. 

-Replication is from memory to memory.

-It operates without any manual intervention even during topology changes like failover or rebalance.

-In case of any network failure, XDCR can resume replication from where it was interrupted. XDCR also continuously retries until the replication is successful.

Which type of bucket allows disk persistence in Couchbase? 

Data can be stored on disk(persistently/permanently) for buckets of type Couchbase

What is vBucket in Couchbase?

vBuckets are sometimes referred to as shards. i.e. partition of data, that allows data distribution all over the nodes in a cluster. They are used to allocate the information effectively along with throughout a cluster.Mapping of vBuckets to nodes known as the cluster map. By default each bucket is divided into 1024 vBuckets.

What is cbq tool in Couchbase?

cbq is a tool like sqlplus for Oracle, to run/execute N1QL queries from the command line.

What Is Query Workbench? 

Couchbase Web Console providesa Query Workbench which can be used to execute N1QL queries.

What are replicas in Couchbase?

Repilcas are copies of data that reside on another node in a Cluster. 

If we provide replicas: 1 to a Couchbase bucket, total how many data copies will be there in the cluster?

 Total two copies will be available on the cluster( 1 original + 1 replica).

Is there any benchmark, how many replicas to be defined for a Couchbase cluster?

As a rule, configure one replica for a cluster of up to five nodes; one or two replicas for from five to ten nodes; and one, two, or three replicas for over ten nodes. 

What happens when a Couchbase node fails? 

Data on the failed node is not accessible. If auto-failover is configured, after the configured number of Auto Failover seconds, replicas on other node(s) will get prompted and data that was unavailiable will now be available. Since auto-failover is a forceful failover, in-fly transactions will be terminated. Hence there might/will be a data loss in auto-failover.

What are mem_low_wat , mem_high_wat parameters in Couchbase ?

In a nutshell, Both of these parameters are used to help manage memory usage in a Couchbase cluster and prevent out-of-memory errors. By setting appropriate values for these parameters, you can help ensure that your Couchbase cluster is using memory effectively and efficiently. We usually do not touch these parameters unless it is suggested by Couchbase support team.

mem_low_wat stands for "memory low watermark" and specifies the percentage of memory usage below which the server will start evicting data from memory to disk to maintain the specified memory quota. If the memory usage exceeds mem_low_wat, Couchbase will start flushing some data to disk in order to free up memory.

mem_high_wat stands for "memory high watermark" and specifies the percentage of memory usage above which the server will stop allowing new writes to the bucket until the memory usage drops below the threshold. If the memory usage exceeds mem_high_wat, Couchbase will begin rejecting new writes until enough data has been flushed to disk to bring the memory usage below the threshold. 

How conflict resolution is handled in Couchbase when there is bi-directional replication scheduled? 

XDCR perform checks of metadata to resolve conflicts.

1) Numerical sequence, which is incremented on each mutation
2) CAS value
3) Document flags
4) Expiration (TTL) value

By default XDCR fetches metadata twice from every document before it replicates the document at a destination cluster. XDCR fetches metadata on the source cluster and looks at the number of revisions for a document. It compares this number with the number of revisions on the destination cluster and the document with more revisions is considered the "winner".

Once the document reaches the destination, this cluster will request metadata once again to confirm the document on the destination has not changed since the initial check. If the document from the source cluster is still the "winner" it will be persisted onto disk at the destination. 

The key point is that the number of document mutations(Revision count) is the main factor that determines whether XDCR keeps a document version or not. If both documents have the same number of mutations, XDCR selects a winner based on other document metadata.

When a node usually goes to WarmUp State? 

If a Couchbase Server node is starting up for the first time, it creates any database files that are necessary and begins serving data immediately. However, if there is already data on the disk, usually because the node rebooted or the service restarted, the node needs to read all of this data of the disk before it can begin serving data. This process is called warmup and it can take some time depending on the size of the data.

When Couchbase Server is restarted on a node, the node goes through a warmup process before it restarts the handling of data requests. During this warmup process, data on disk is sequentially reloaded into memory.

Which Couchbase service ejects the data from memory when the memory quota is exceeded? 

If a bucket’s memory quota is exceeded, items may be ejected from the bucket by the Data Service.

For each bucket, available memory is managed according to two watermarks, which are mem_low_wat and mem_high_wat. Based on the bucket’s configuration, items can be ejected from the bucket, the Data Service ejects items from the bucket until the quantity of data has decreased to the mem_low_wat watermark.

Warning: We do not recommend that you change the ejection defaults unless required/requested by Couchbase Support.
Note: Changes of thresholds are NOT persistent and must be reapplied after the bucket warmup.

What is Expiry Pager in Couchbase? 

It scans for items that have expired, and erases them from memory and disk; after which, a tombstone remains for a default period of 3 days. The expiry pager runs every 60 minutes by default.

Couchbase Query Service requires RAM? 

The Query Service and the Backup Service (introduced from version 7) don't require an administrator-specified memory quota. It requires CPU resources to process queries and disk I/O to retrieve data from disk.

Mention a few Ports and their usage in Couchbase? 

Here are a few ports and their usage in Couchbase:

8091: This is the default port for the Couchbase Web Administration Console. It is used to access the Couchbase cluster web console.

8093: This is the default port for the Couchbase Query Service, which is responsible for processing and executing N1QL queries.

11210: This is the default port for the Couchbase Data Service. It is used for communication between the Couchbase client SDKs and the Couchbase server

18091: This is SSL couchbase port to access Couchbase cluster Web UI from browser 



💚 HAPPY LEARNING! 💚

DISCLAIMER

The purpose of sharing the content on this website is to Educate. The author/owner of the content does not warrant that the information provided on this website is fully complete and shall not be responsible for any errors or omissions. The author/owner shall have neither liability nor responsibility to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the contents of this website. So, use the content of this website at your own risk.

This content has been shared under Educational And Non-Profit Purposes Only. No Copyright Infringement Intended, All Rights Reserved to the Actual Owner.

For Copyright Content Removal Please Contact us by Email at besttechreads[at]gmail.com


Tags: Latest couchbase interview questions and answers, Couchbase interview questions 2023, Couchbase interview questions and answers 2023, Couchbase 2024, DBA interview questions,Best Couchbase DBA interview answers,Advanced Couchbase DBA interview questions,Sample Couchbase DBA interview questions,Couchbase DBA interview preparation guide,Couchbase DBA interview tips and tricks,Couchbase DBA interview best practices,Couchbase DBA interview FAQ,Couchbase DBA interview experience,Couchbase DBA interview process,Couchbase DBA interview skills,Couchbase DBA interview assessment,Couchbase DBA interview evaluation,Couchbase DBA performance tuning interview questions,Couchbase DBA backup and recovery interview questions,Couchbase DBA cluster management interview questions,Couchbase DBA security interview questions,Couchbase server,NoSQL database,Couchbase, tutorial,Couchbase vs MongoDB,Couchbase performance,Couchbase architecture,Couchbase data modeling,Couchbase caching,Couchbase indexing,Couchbase administration,Couchbase cloud,Couchbase community edition,Couchbase enterprise edition,Couchbase mobile,Couchbase sync gateway,Couchbase N1QL,Couchbase FTS,Couchbase SDKs,Couchbase integrations,Couchbase backup and restore,Interview questions,Common interview questions,Top interview questions,Behavioral interview questions,Tough interview questions,Tricky interview questions,Interview questions and answers,Sample interview questions,Best interview questions,Technical interview questions,Competency-based interview questions,Phone interview questions,Video interview questions,Group interview questions,Second interview questions,Interview preparation questions,Interview questions to ask,HR interview questions,Manager interview questions, Job-specific interview questions. 


Post a Comment

Previous Post Next Post