Skip to content

Commit

Permalink
[Doc] optimize search for system variable and description of follower…
Browse files Browse the repository at this point in the history
… FEs (StarRocks#42614)

Signed-off-by: evelynzhaojie <[email protected]
  • Loading branch information
evelynzhaojie authored Mar 14, 2024
1 parent 029b611 commit 37b4f73
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/en/deployment/plan_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ StarRocks mainly consists of two types of components: FE nodes and BE nodes. Eac

FE nodes are mainly responsible for metadata management, client connection management, query planning, and query scheduling.

In production, we recommend you deploy at least **THREE** Follower FE nodes in your StarRocks cluster to prevent single points of failure (SPOFs).
In production, we recommend you deploy at least **THREE** Follower FE nodes in your StarRocks cluster to prevent single points of failure (SPOFs). The Leader FE will be automatically elected from these three followers.

StarRocks uses the BDB JE protocol to manage the metadata across FE nodes. StarRocks elects a Leader FE node from all Follower FE nodes. Only the Leader FE node can write metadata. The other Follower FE nodes only update their metadata based on the logs from the Leader FE node. Each time the Leader FE node fails, StarRocks re-elects a new Leader FE node as long as more than half of the Follower FE nodes are alive.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/introduction/Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FE is responsible for metadata management, client connection management, query p

| **FE Role** | **Metadata management** | **Leader election** |
| ----------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Leader FE | The leader FE reads and writes metadata. Follower and observer FEs can only read metadata. They route metadata write requests to the leader FE. The leader FE updates the metadata and then uses BDE JE to synchronize the metadata changes to the follower and observer FEs. Data writes are considered successful only after the metadata changes are synchronized to more than half of the follower FEs. | The leader FE is elected from follower FEs. To perform leader election, more than half of the follower FEs in the cluster must be active. When the leader FE fails, follower FEs will start another round of leader election. |
| Leader FE | The leader FE reads and writes metadata. Follower and observer FEs can only read metadata. They route metadata write requests to the leader FE. The leader FE updates the metadata and then uses BDE JE to synchronize the metadata changes to the follower and observer FEs. Data writes are considered successful only after the metadata changes are synchronized to more than half of the follower FEs. | The leader FE, technically speaking, is also a follower node and is elected from follower FEs. To perform leader election, more than half of the follower FEs in the cluster must be active. When the leader FE fails, follower FEs will start another round of leader election. |
| Follower FE | Followers can only read metadata. They synchronize and replay logs from the leader FE to update metadata. | Followers participate in leader election, which requires more than half of the followers in the cluster be active. |
| Observer FE | Observers synchronize and replay logs from the leader FE to update metadata. | Observers are mainly used to increase the query concurrency of the cluster. Observers do not participate in leader election and therefore, will not add leader selection pressure to the cluster.|

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/deployment/plan_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ StarRocks 主要由两种类型的组件组成:FE 节点和 BE 节点。每个

FE 节点主要负责元数据管理、客户端连接管理、查询计划和查询调度。

对于 StarRocks 生产集群,建议您至少部署**三个** Follower FE 节点,以防止单点故障。
对于 StarRocks 生产集群,建议您至少部署**三个** Follower FE 节点,以防止单点故障。Leader FE 会从 Follower FE 中自动选出。

StarRocks 通过 BDB JE 协议跨 FE 节点管理元数据。StarRocks 从所有 Follower FE 节点中选出一个 Leader FE 节点。只有 Leader FE 节点可以写入元数据,其他 Follower FE 节点只能根据 Leader FE 节点的日志更新元数据。如果 Leader FE 节点掉线,只要超过半数的 Follower FE 节点存活,StarRocks 就会重新选举出一个新的 Leader FE 节点。

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/introduction/Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FE 有三种角色:Leader FE,Follower FE 和 Observer FE,区别如下。

| **FE 角色** | **元数据读写** | **Leader 选举** |
| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Leader | Leader FE 提供元数据读写服务,Follower 和 Observer 只有读取权限,无写入权限。Follower 和 Observer 将元数据写入请求路由到 Leader,Leader 更新完元数据后,会通过 BDB JE (Berkeley DB Java Edition) 同步给 Follower 和 Observer。必须有半数以上的 Follower 节点同步成功才算作元数据写入成功。 | Leader Follower 中自动选出。如果当前 Leader 节点失败,Follower 会发起新一轮选举。 |
| Leader | Leader FE 提供元数据读写服务,Follower 和 Observer 只有读取权限,无写入权限。Follower 和 Observer 将元数据写入请求路由到 Leader,Leader 更新完元数据后,会通过 BDB JE (Berkeley DB Java Edition) 同步给 Follower 和 Observer。必须有半数以上的 Follower 节点同步成功才算作元数据写入成功。 | Leader 本身也是 Follower 节点,是从 Follower 中自动选出的。如果当前 Leader 节点失败,Follower 会发起新一轮选举。 |
| Follower | 只有元数据读取权限,无写入权限。通过回放 Leader 的元数据日志来异步同步数据。 | Follower 参与 Leader 选举,会通过类 Paxos 的 BDBJE 协议自动选举出一个 Leader,必须有半数以上的 Follower 节点存活才能进行选主。 |
| Observer | 同 Follower。 | Observer 主要用于扩展集群的查询并发能力,可选部署。Observer 不参与选主,不会增加集群的选主压力。 |

Expand Down
1 change: 1 addition & 0 deletions docs/zh/reference/System_variable.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
displayed_sidebar: "Chinese"
keywords: ['session','variable']
---

# 系统变量
Expand Down

0 comments on commit 37b4f73

Please sign in to comment.