Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v15 Chinese docs #1180

Draft
wants to merge 4 commits into
base: prod
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions content/zh/docs/15.0/concepts/execution-plans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Execution Plans
---

Vitess解析VTGate和VTTablet层解析查询,以评估执行查询的最佳方法。这种评估被称为查询规划,并导致查询执行计划。

执行计划取决于查询和相关的VSchema。Vitess的计划策略的基本目标之一是将尽可能多的工作推给底层MySQL实例。当这不可能时,Vitess将使用一个计划,从多个来源收集输入,并合并结果以产生正确的查询结果。

### 评价模型
执行计划由运算符组成,每个运算符实现一个特定的工作。这些操作符组合成一个树状结构,代表了整个执行计划。该计划将每个运算符表示为树上的一个节点。每个运算符接受零个或多个行作为输入,并产生零个或多个行作为输出。这意味着一个操作者的输出成为下一个操作者的输入。连接树中两个分支的操作符结合了来自两个输入流的输入,并产生一个单一的输出。

执行计划的评估从树的叶子节点开始。叶子节点从VTTablet, Topology Service 中拉入数据,在某些情况下还能在本地评估表达式的值。每个叶子节点不会有来自其他操作者的输入,并将它们产生的任何节点输送到其父节点。父节点然后将节点输送到其父节点,一直到根节点。根节点产生最终的查询结果,并将结果传递给用户。

### 观察执行计划
在VTGate个级可以通过浏览`/queryz`端点观察到缓存执行计划。
从Vitess 6 开始,也可以用`EXPLAIN FORMAT=vitess <query>` 观察到单声明计划。


5 changes: 5 additions & 0 deletions content/zh/docs/15.0/concepts/move-tables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: MoveTables
---

正在建设之中
5 changes: 5 additions & 0 deletions content/zh/docs/15.0/concepts/query-rewriting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Query Rewriting
---

正在建设之中
4 changes: 4 additions & 0 deletions content/zh/docs/15.0/concepts/vstream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: VStream
---
正在建设之中-
5 changes: 5 additions & 0 deletions content/zh/docs/15.0/concepts/vtctl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: vtctl
---

正在建设之中
5 changes: 5 additions & 0 deletions content/zh/docs/15.0/concepts/vtctld.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: vtctld
---

正在建设之中
11 changes: 11 additions & 0 deletions content/zh/docs/15.0/concepts/vtgate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: VTGate
---

VTGate是一个轻量级的代理服务器,它将流量导向正确的VTTablet服务器并将综合结果返回给客户。它同时使用MySQL协议和Vitess gRPC协议。因此,您的应用程序可以像连接MySQL服务器一样连接VTGate。

在将查询路由到适当的VTTablet服务器时,VTGate会考虑分片方案、所需的延迟、表的可用性以及其底层MySQL实例

相关的Vitess文档。

[Execution Plans](../execution-plans)
41 changes: 2 additions & 39 deletions content/zh/docs/15.0/overview/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,7 @@ Vitess平台由许多服务器进程、命令行实用程序和基于Web的实

下图说明了Vitess的组件

![Vitess Overview Architecture Diagram](../img/VitessOverview.png)
![Vitess Overview Architecture Diagram](../img/architecture.svg)

## Topology

[拓扑服务](../../user-guides/topology-service) 一个元数据存储,包含有关正在运行的服务器、分片方案和复制图的信息。拓扑由一致的数据存储支持。您可以使用**vtctl** (命令行) 和 **vtctld** (web)查看拓扑.

在Kubernetes中,数据存储是etcd。 Vitess源代码还附带[Apache ZooKeeper](http://zookeeper.apache.org/)支持。

## vtgate

**vtgate** 是一个轻型代理服务器,它将流量路由到正确的vttablet,并将合并的结果返回给客户端。应用程序向vtgate发起查询。客户端使用起来非常简单,它只需要能够找到vtgate实例就能使vitess。

为了路由查询,vtgate综合考虑了分片方案、数据延迟以及vttablet及其对应底层MySQL实例的可用性。

## vttablet

**vttablet** 是一个位于MySQL数据库前面的代理服务器。vitess实现中每个MySQL实例都有一个vttablet。

执行的任务试图最大化吞吐量,同时保护mysql不受有害查询的影响。它的特性包括连接池、查询重写和重用重复数据。此外,vtTablet执行vtcl启动的管理任务,并提供用于过滤复制和数据导出的流式服务。

通过在MySQL数据库前运行vttablet并更改您的应用程序以使用Vitess客户端而不是MySQL驱动程序,您的应用程序将受益于vttablet的连接池,查询重写和重用数据集等功能。

## vtctl

**vtctl** vtctl是一个用于管理Vitess集群的命令行工具。它允许用户或应用程序轻松地与Vitess实现交互。使用vtctl,您可以识别主数据库和副本数据库,创建表,启动故障转移,执行分片(和重新分片)操作等。

当vtctl执行操作时,它会根据需要更lockserver。其他Vitess服务器会观察这些变化并做出相应的反应。例如,如果使用vtctl故障转移到新的主数据库,则vtgate会查看更改并将将写入流量切到新主服务器。

## vtctld

**vtctld** vtctld是一个HTTP服务器,允许您浏览存储在lockserver中的信息。它对于故障排除或获取服务器及其当前状态的高层概观非常有用。

## vtworker

**vtworker** 托管长时间运行的进程。它支持插件架构并提供代码库,以便您可以轻松选择要使用的vttablet。插件可用于以下类型的作业:

* 水平拆分或合并过程中检查数据的完整性
* 垂直拆分或合并过程中检查数据的完整性

vtworker还可以让您轻松添加其他验证程序。例如,如果一个keyspace中的索引表引用到另一keyspace中的数据,则可以执行片内完整性检查以验证类似外键的关系或跨分片完整性检查。
关于组件的进一步信息,见 [概念](../../concepts).

2 changes: 1 addition & 1 deletion content/zh/docs/15.0/overview/cloud-native.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 私有云
title: 云原生
---

Vitess非常适合云部署,因为它使数据库能够逐步增加容量。运行Vitess的最简单方法是通过Kubernetes。
Expand Down
Binary file removed content/zh/docs/15.0/overview/img/VitessOverview.png
Binary file not shown.
1 change: 1 addition & 0 deletions content/zh/docs/15.0/overview/img/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions content/zh/docs/15.0/reference/_index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Reference
title: 参考
description: Detailed information about specific Vitess functionality
weight: 5
---

{{< info >}}
因为这些文档不维护,所以它们是旧的。
{{< /info >}}
{{< /info >}}
2 changes: 1 addition & 1 deletion content/zh/docs/15.0/user-guides/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: User Guides
title: 用户指南
description: Practical Guides for Most Scenarios
weight: 3
---
Expand Down
2 changes: 1 addition & 1 deletion content/zh/docs/16.0/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: v16.0 (Development)
description: Under construction, development release. 因为这些文档不维护,所以它们是旧的。你想了解的有关世界上最具扩展性的开源MySQL平台的一切,都在这里
description: 正在建设之中, 开发人发布. 因为这些文档不维护,所以它们是旧的。你想了解的有关世界上最具扩展性的开源MySQL平台的一切,都在这里
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a big fan on this PR <3
We should mirror this change to the release automation script in ./tools so that the regex and the new text is in chinese instead of english

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I am actually struggling to understand the structure of the website, and how Hugo and Bulma work lol. I initially copy-pasted all my content, and I broke everything.
I am proceeding with caution, and by smaller chunks.
I'll check the release automation script.

notoc: true
cascade:
version: v16.0
Expand Down