You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2021/03/05 13:09:38 UTC
[apisix] branch master updated: docs: change the img tag to
markdown syntax (#3765)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new f657b90 docs: change the img tag to markdown syntax (#3765)
f657b90 is described below
commit f657b9023b07091687a3163cb4de8594b0a0f593
Author: Cliff Su <st...@yahoo.com.tw>
AuthorDate: Fri Mar 5 21:09:30 2021 +0800
docs: change the img tag to markdown syntax (#3765)
---
docs/en/latest/architecture-design.md | 12 ++++++------
docs/en/latest/benchmark.md | 8 ++++----
docs/zh/latest/architecture-design.md | 12 ++++++------
docs/zh/latest/benchmark.md | 10 +++++-----
4 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/docs/en/latest/architecture-design.md b/docs/en/latest/architecture-design.md
index 9995297..e751da8 100644
--- a/docs/en/latest/architecture-design.md
+++ b/docs/en/latest/architecture-design.md
@@ -53,7 +53,7 @@ title: Architecture Design
### Plugin Hierarchy Structure
-<img src="../../assets/images/flow-plugin-internal.png" width="50%" height="50%" />
+
## APISIX Config
@@ -91,7 +91,7 @@ The route mainly consists of three parts: matching rules (e.g uri, host, remote_
The following image shows an example of some Route rules. When some attribute values are the same, the figure is identified by the same color.
-<img src="../../assets/images/routes-example.png" width="50%" height="50%" />
+
We configure all the parameters directly in the Route, it's easy to set up, and each Route has a relatively high degree of freedom. But when our Route has more repetitive configurations (such as enabling the same plugin configuration or upstream information), once we need update these same properties, we have to traverse all the Routes and modify them, so it's adding a lot of complexity of management and maintenance.
@@ -131,7 +131,7 @@ For specific options of Route, please refer to [Admin API](admin-api.md#route).
A `Service` is an abstraction of an API (which can also be understood as a set of Route abstractions). It usually corresponds to the upstream service abstraction. Between `Route` and `Service`, usually the relationship of N:1, please see the following image.
-<img src="../../assets/images/service-example.png" width="50%" height="50%" />
+
Different Route rules are bound to a Service at the same time. These Routes will have the same upstream and plugin configuration, reducing redundant configuration.
@@ -268,7 +268,7 @@ In theory, you can write arbitrary Lua code in `Script`, or you can directly cal
Upstream is a virtual host abstraction that performs load balancing on a given set of service nodes according to configuration rules. Upstream address information can be directly configured to `Route` (or `Service`). When Upstream has duplicates, you need to use "reference" to avoid duplication.
-<img src="../../assets/images/upstream-example.png" width="50%" height="50%" />
+
As shown in the image above, by creating an Upstream object and referencing it by ID in `Route`, you can ensure that only the value of an object is maintained.
@@ -490,7 +490,7 @@ Set the route that best suits your business needs in the local configuration `co
For the API gateway, it is usually possible to identify a certain type of requester by using a domain name such as a request domain name, a client IP address, etc., and then perform plugin filtering and forward the request to the specified upstream, but sometimes the depth is insufficient.
-<img src="../../assets/images/consumer-who.png" width="50%" height="50%" />
+
As shown in the image above, as an API gateway, you should know who the API Consumer is, so you can configure different rules for different API Consumers.
@@ -501,7 +501,7 @@ As shown in the image above, as an API gateway, you should know who the API Cons
In APISIX, the process of identifying a Consumer is as follows:
-<img src="../../assets/images/consumer-internal.png" width="50%" height="50%" />
+
1. Authorization certification: e.g [key-auth](./plugins/key-auth.md), [JWT](./plugins/jwt-auth.md), etc.
2. Get consumer_name: By authorization, you can naturally get the corresponding Consumer `id`, which is the unique identifier of the Consumer object.
diff --git a/docs/en/latest/benchmark.md b/docs/en/latest/benchmark.md
index 7484061..c8e91f0 100644
--- a/docs/en/latest/benchmark.md
+++ b/docs/en/latest/benchmark.md
@@ -37,13 +37,13 @@ and the response size was 1KB.
The x-axis means the size of CPU core, and the y-axis is QPS.
-<img src="../../assets/images/benchmark-1.jpg" width="70%" height="70%" />
+
#### Latency
Note the y-axis latency in **microsecond(μs)** not millisecond.
-<img src="../../assets/images/latency-1.jpg" width="70%" height="70%" />
+
#### Flame Graph
@@ -82,13 +82,13 @@ and the response size was 1KB.
The x-axis means the size of CPU core, and the y-axis is QPS.
-<img src="../../assets/images/benchmark-2.jpg" width="70%" height="70%" />
+
#### Latency
Note the y-axis latency in **microsecond(μs)** not millisecond.
-<img src="../../assets/images/latency-2.jpg" width="70%" height="70%" />
+
#### Flame Graph
diff --git a/docs/zh/latest/architecture-design.md b/docs/zh/latest/architecture-design.md
index 7dc6be8..9a1d560 100644
--- a/docs/zh/latest/architecture-design.md
+++ b/docs/zh/latest/architecture-design.md
@@ -53,7 +53,7 @@ title: 架构设计
### 插件内部结构
-<img src="../../assets/images/flow-plugin-internal.png" width="50%" height="50%" />
+
## APISIX Config
@@ -93,7 +93,7 @@ Route 字面意思就是路由,通过定义一些规则来匹配客户端的
Route 中主要包含三部分内容:匹配规则(比如 uri、host、remote_addr 等),插件配置(限流限速等)和上游信息。
请看下图示例,是一些 Route 规则的实例,当某些属性值相同时,图中用相同颜色标识。
-<img src="../../assets/images/routes-example.png" width="50%" height="50%" />
+
我们直接在 Route 中完成所有参数的配置,优点是容易设置,每个 Route 都相对独立自由度比较高。但当我们的 Route 有比较多的重复配置(比如启用相同的插件配置或上游信息),一旦我们要更新这些相同属性时,就需要遍历所有 Route 并进行修改,给后期管理维护增加不少复杂度。
@@ -134,7 +134,7 @@ Server: APISIX web server
`Service` 是某类 API 的抽象(也可以理解为一组 Route 的抽象)。它通常与上游服务抽象是一一对应的,`Route`
与 `Service` 之间,通常是 N:1 的关系,参看下图。
-<img src="../../assets/images/service-example.png" width="50%" height="50%" />
+
不同 Route 规则同时绑定到一个 Service 上,这些 Route 将具有相同的上游和插件配置,减少冗余配置。
@@ -278,7 +278,7 @@ local _M = {
Upstream 是虚拟主机抽象,对给定的多个服务节点按照配置规则进行负载均衡。Upstream 的地址信息可以直接配置到 `Route`(或 `Service`) 上,当 Upstream 有重复时,就需要用“引用”方式避免重复了。
-<img src="../../assets/images/upstream-example.png" width="50%" height="50%" />
+
如上图所示,通过创建 Upstream 对象,在 `Route` 用 ID 方式引用,就可以确保只维护一个对象的值了。
@@ -502,7 +502,7 @@ APISIX 区别于其他 API 网关的一大特点是允许用户选择不同 Rout
对于 API 网关通常可以用请求域名、客户端 IP 地址等字段识别到某类请求方,
然后进行插件过滤并转发请求到指定上游,但有时候这个深度不够。
-<img src="../../assets/images/consumer-who.png" width="50%" height="50%" />
+
如上图所示,作为 API 网关,需要知道 API Consumer(消费方)具体是谁,这样就可以对不同 API Consumer 配置不同规则。
@@ -513,7 +513,7 @@ APISIX 区别于其他 API 网关的一大特点是允许用户选择不同 Rout
在 APISIX 中,识别 Consumer 的过程如下图:
-<img src="../../assets/images/consumer-internal.png" width="50%" height="50%" />
+
1. 授权认证:比如有 [key-auth](plugins/key-auth.md)、[JWT](plugins/jwt-auth.md) 等。
2. 获取 consumer_name:通过授权认证,即可自然获取到对应的 Consumer name,它是 Consumer 对象的唯一识别标识。
diff --git a/docs/zh/latest/benchmark.md b/docs/zh/latest/benchmark.md
index 27b64f9..b65f5be 100644
--- a/docs/zh/latest/benchmark.md
+++ b/docs/zh/latest/benchmark.md
@@ -35,19 +35,19 @@ title: 压力测试
下图中 x 轴为 CPU 的使用个数,y 轴为每秒处理的请求数:
-<img src="../../assets/images/benchmark-1.jpg" width="70%" height="70%" />
+
#### 延时
请注意 y 轴延时的单位是**微秒(μs)**,而不是毫秒:
-<img src="../../assets/images/latency-1.jpg" width="70%" height="70%" />
+
#### 火焰图
火焰图的采样结果:
-<img src="../../assets/images/flamegraph-1.jpg" />
+
### 测试反向代理,开启 2 个插件
@@ -57,13 +57,13 @@ title: 压力测试
下图中 x 轴为 CPU 的使用个数,y 轴为每秒处理的请求数:
-<img src="../../assets/images/benchmark-2.jpg" width="70%" height="70%" />
+
#### Latency
请注意 y 轴延时的单位是**微秒(μs)**,而不是毫秒:
-<img src="../../assets/images/latency-2.jpg" width="70%" height="70%" />
+
#### 火焰图