All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Concepts

Last updated:2022-01-11 13:43:23

This topic describes the basic concepts related to KES.

Cluster

A cluster is a collection of one or more nodes. The nodes are servers that jointly store all your data. A cluster provides compound indexes and search capabilities for its nodes.

Node

A node is a server in a cluster. Nodes are used to store data and support indexing and search activities in a cluster. KES supports the following four types of nodes:

  • Data node: a node that stores index data and creates, deletes, modifies, queries, and aggregates documents. Data nodes have high requirements for CPU, memory, and I/O resources. During optimization, you must monitor the status of data nodes. When resources are insufficient in a cluster, you can add nodes to the cluster. If a cluster contains only data nodes, three of them act as master nodes by default.

  • Master node: a node that performs cluster-related operations. For example, a master node can create or delete indexes, track the nodes that are part of the cluster, and determine the shards to be allocated to nodes. To ensure the stability of a cluster, KES separates master nodes from data nodes, and designates three independent nodes as master nodes. In a large-scale cluster, you can configure master nodes to enhance cluster stability.

  • Coordinator node: a node that only routes requests, handles search operations, and distributes indexing operations. It behaves as an intelligent load balancer to forward requests to data nodes. Each data node processes the requests locally and returns the results to the coordinator node. After the data is collected, the coordinator node combines the results from all data nodes into a single global result.

  • Warm node: a node that stores read-only and rarely queried indexes. In contrast, a data node stores the latest and frequently queried indexes, and undergoes high write load. Warm nodes allow you to isolate hot data from cold data. This improves query and write efficiency and also reduces storage costs.

Index

An index is a collection of documents with the same characteristics. It is equivalent to a relational database. It is used to store and index associated data. An index is usually identified by a name. The name cannot contain uppercase letters or commas (,), and cannot start with an underscore (_). The name is used to point to the index when you index, search for, update, or delete the documents associated with the index.

Type

A type is usually a logical classification or partition of an index. It is equivalent to a table in a relational database. You can store different types of documents in an index. In Elasticsearch 6.x, an index contains only one type. In Elasticsearch 7.x and later, the concept of type is removed.

Document

A document is a basic information unit that can be indexed. It is equivalent to a row of data in a relational database. Documents can be represented in the JSON format. You can store a number of documents in an index, and all documents must be indexed.

Mapping

A mapping is used to define an index structure. It is equivalent to a schema in a relational database. KES stores the information about fields in the mapping. The mapping is transmitted as a JSON object in a file.

Field

A field is the smallest unit in KES. It is equivalent to a column of data and similar to a key in the JSON format.

Shard

A shard is a segment of an index. When an index contains a large number of documents, one node cannot respond to requests of clients in time due to insufficient memory, disk capacity, or processing capability. In this case, KES allows you to divide one index into multiple shards and distribute them to different nodes for a distributed search. The number of shards must be specified before the index is created, and cannot be changed after the index is created.

Replica

KES allows you to set multiple replicas for a shard for the following purposes:

  • Improve the fault tolerance of the system: You can recover a shard on a node from the replica when the shard is damaged or lost.
  • Improve the query efficiency of KES: KES automatically applies load balancing to search requests.
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback