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

  • Learning Couchbase
  • Henry Potsangbam
  • 355字
  • 2021-07-30 10:25:00

The architecture of Couchbase

Couchbase clusters consist of multiple nodes. A cluster is a collection of one or more instances of Couchbase server that are configured as a logical cluster. The following is a Couchbase server architecture diagram:

As mentioned earlier, while most of the cluster technologies work on master-slave relationships, Couchbase works on a peer-to-peer node mechanism. This means there is no difference between the nodes in the cluster. The functionality provided by each node is the same. Thus, there is no single point of failure. When there is a failure of one node, another node takes up its responsibility, thus providing high availability.

Data manager

Any operation performed on the Couchbase database system gets stored in the memory, which acts as a caching layer. By default, every document gets stored in the memory for each read, insert, update, and so on, until the memory is full. It's a drop-in replacement for Memcache. However, in order to provide persistency of the record, there is a concept called disk queue. This will flush the record to the disk asynchronously, without impacting the client request. This functionality is provided automatically by the data manager, without any human intervention.

Cluster management

The cluster manager is responsible for node administration and node monitoring within a cluster. Every node within a Couchbase cluster includes the cluster manager component, data storage, and data manager. It manages data storage and retrieval. It contains the memory cache layer, disk persistence mechanism, and query engine.

Couchbase clients use the cluster map provided by the cluster manager to find out which node holds the required data, and then communicate with the data manager on that node to perform database operations.

The Erlang language is used to develop cluster management. Erlang provides a dynamic type system and built-in support for concurrency processes, which are isolated from one another, and are very lightweight in nature. A single Erlang VM, can run a quarter of a million processes. It also provides a lot of modules that help with distributed processing. Moreover, it provides enhancement of debugging and patching live systems is easy compared to any other language.

主站蜘蛛池模板: 饶阳县| 加查县| 会宁县| 随州市| 微山县| 东兴市| 桂阳县| 信阳市| 宁波市| 垣曲县| 临高县| 绩溪县| 紫阳县| 云霄县| 咸阳市| 林口县| 富顺县| 新乡市| 恭城| 靖西县| 黔南| 临颍县| 剑河县| 英超| 昭平县| 镇巴县| 高阳县| 东宁县| 太湖县| 田林县| 株洲县| 盐源县| 开封县| 孟津县| 尤溪县| 普宁市| 凤庆县| 洛隆县| 贵州省| 临城县| 曲松县|