diff --git a/content/zh/docs/15.0/concepts/execution-plans.md b/content/zh/docs/15.0/concepts/execution-plans.md new file mode 100644 index 000000000..be72dacaf --- /dev/null +++ b/content/zh/docs/15.0/concepts/execution-plans.md @@ -0,0 +1,18 @@ +--- +title: Execution Plans +--- + +Vitess解析VTGate和VTTablet层解析查询,以评估执行查询的最佳方法。这种评估被称为查询规划,并导致查询执行计划。 + +执行计划取决于查询和相关的VSchema。Vitess的计划策略的基本目标之一是将尽可能多的工作推给底层MySQL实例。当这不可能时,Vitess将使用一个计划,从多个来源收集输入,并合并结果以产生正确的查询结果。 + +### 评价模型 +执行计划由运算符组成,每个运算符实现一个特定的工作。这些操作符组合成一个树状结构,代表了整个执行计划。该计划将每个运算符表示为树上的一个节点。每个运算符接受零个或多个行作为输入,并产生零个或多个行作为输出。这意味着一个操作者的输出成为下一个操作者的输入。连接树中两个分支的操作符结合了来自两个输入流的输入,并产生一个单一的输出。 + +执行计划的评估从树的叶子节点开始。叶子节点从VTTablet, Topology Service 中拉入数据,在某些情况下还能在本地评估表达式的值。每个叶子节点不会有来自其他操作者的输入,并将它们产生的任何节点输送到其父节点。父节点然后将节点输送到其父节点,一直到根节点。根节点产生最终的查询结果,并将结果传递给用户。 + +### 观察执行计划 +在VTGate个级可以通过浏览`/queryz`端点观察到缓存执行计划。 +从Vitess 6 开始,也可以用`EXPLAIN FORMAT=vitess ` 观察到单声明计划。 + + diff --git a/content/zh/docs/15.0/concepts/move-tables.md b/content/zh/docs/15.0/concepts/move-tables.md new file mode 100644 index 000000000..cc4287252 --- /dev/null +++ b/content/zh/docs/15.0/concepts/move-tables.md @@ -0,0 +1,5 @@ +--- +title: MoveTables +--- + +正在建设之中 diff --git a/content/zh/docs/15.0/concepts/query-rewriting.md b/content/zh/docs/15.0/concepts/query-rewriting.md new file mode 100644 index 000000000..b9f55823c --- /dev/null +++ b/content/zh/docs/15.0/concepts/query-rewriting.md @@ -0,0 +1,5 @@ +--- +title: Query Rewriting +--- + +正在建设之中 diff --git a/content/zh/docs/15.0/concepts/vstream.md b/content/zh/docs/15.0/concepts/vstream.md new file mode 100644 index 000000000..e74020e58 --- /dev/null +++ b/content/zh/docs/15.0/concepts/vstream.md @@ -0,0 +1,4 @@ +--- +title: VStream +--- +正在建设之中- diff --git a/content/zh/docs/15.0/concepts/vtctl.md b/content/zh/docs/15.0/concepts/vtctl.md new file mode 100644 index 000000000..10d5f00f3 --- /dev/null +++ b/content/zh/docs/15.0/concepts/vtctl.md @@ -0,0 +1,5 @@ +--- +title: vtctl +--- + +正在建设之中 diff --git a/content/zh/docs/15.0/concepts/vtctld.md b/content/zh/docs/15.0/concepts/vtctld.md new file mode 100644 index 000000000..d295039d2 --- /dev/null +++ b/content/zh/docs/15.0/concepts/vtctld.md @@ -0,0 +1,5 @@ +--- +title: vtctld +--- + +正在建设之中 diff --git a/content/zh/docs/15.0/concepts/vtgate.md b/content/zh/docs/15.0/concepts/vtgate.md new file mode 100644 index 000000000..bab6f072a --- /dev/null +++ b/content/zh/docs/15.0/concepts/vtgate.md @@ -0,0 +1,11 @@ +--- +title: VTGate +--- + +VTGate是一个轻量级的代理服务器,它将流量导向正确的VTTablet服务器并将综合结果返回给客户。它同时使用MySQL协议和Vitess gRPC协议。因此,您的应用程序可以像连接MySQL服务器一样连接VTGate。 + +在将查询路由到适当的VTTablet服务器时,VTGate会考虑分片方案、所需的延迟、表的可用性以及其底层MySQL实例 + +相关的Vitess文档。 + +[Execution Plans](../execution-plans) diff --git a/content/zh/docs/15.0/overview/architecture.md b/content/zh/docs/15.0/overview/architecture.md index a10456030..4af11c025 100644 --- a/content/zh/docs/15.0/overview/architecture.md +++ b/content/zh/docs/15.0/overview/architecture.md @@ -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). diff --git a/content/zh/docs/15.0/overview/cloud-native.md b/content/zh/docs/15.0/overview/cloud-native.md index 1e261d4d1..0d566f066 100644 --- a/content/zh/docs/15.0/overview/cloud-native.md +++ b/content/zh/docs/15.0/overview/cloud-native.md @@ -1,5 +1,5 @@ --- -title: 私有云 +title: 云原生 --- Vitess非常适合云部署,因为它使数据库能够逐步增加容量。运行Vitess的最简单方法是通过Kubernetes。 diff --git a/content/zh/docs/15.0/overview/img/VitessOverview.png b/content/zh/docs/15.0/overview/img/VitessOverview.png deleted file mode 100644 index e8e1b17fc..000000000 Binary files a/content/zh/docs/15.0/overview/img/VitessOverview.png and /dev/null differ diff --git a/content/zh/docs/15.0/overview/img/architecture.svg b/content/zh/docs/15.0/overview/img/architecture.svg new file mode 100644 index 000000000..691225bf6 --- /dev/null +++ b/content/zh/docs/15.0/overview/img/architecture.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/content/zh/docs/15.0/reference/_index.md b/content/zh/docs/15.0/reference/_index.md index 23d0931e1..c9e679a5d 100644 --- a/content/zh/docs/15.0/reference/_index.md +++ b/content/zh/docs/15.0/reference/_index.md @@ -1,9 +1,9 @@ --- -title: Reference +title: 参考 description: Detailed information about specific Vitess functionality weight: 5 --- {{< info >}} 因为这些文档不维护,所以它们是旧的。 -{{< /info >}} \ No newline at end of file +{{< /info >}} diff --git a/content/zh/docs/15.0/user-guides/_index.md b/content/zh/docs/15.0/user-guides/_index.md index e37eddc60..5f7c79884 100644 --- a/content/zh/docs/15.0/user-guides/_index.md +++ b/content/zh/docs/15.0/user-guides/_index.md @@ -1,5 +1,5 @@ --- -title: User Guides +title: 用户指南 description: Practical Guides for Most Scenarios weight: 3 --- diff --git a/content/zh/docs/16.0/_index.md b/content/zh/docs/16.0/_index.md index f4f205c9c..0759fb1d7 100644 --- a/content/zh/docs/16.0/_index.md +++ b/content/zh/docs/16.0/_index.md @@ -1,6 +1,6 @@ --- title: v16.0 (Development) -description: Under construction, development release. 因为这些文档不维护,所以它们是旧的。你想了解的有关世界上最具扩展性的开源MySQL平台的一切,都在这里 +description: 正在建设之中, 开发人发布. 因为这些文档不维护,所以它们是旧的。你想了解的有关世界上最具扩展性的开源MySQL平台的一切,都在这里 notoc: true cascade: version: v16.0