You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2021/03/01 06:06:43 UTC
[apisix] branch master updated: fix docs invalid issues (#3706)
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan 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 233b6c0 fix docs invalid issues (#3706)
233b6c0 is described below
commit 233b6c059c11e1967bae0333183eb7845aaf0573
Author: 琚致远 <ju...@apache.org>
AuthorDate: Mon Mar 1 14:06:33 2021 +0800
fix docs invalid issues (#3706)
---
docs/en/latest/CHANGELOG.md => CHANGELOG.md | 0
docs/en/latest/CODE_STYLE.md => CODE_STYLE.md | 0
README.md | 88 ++++++++++++------------
docs/en/latest/config.json | 10 +--
docs/zh/latest/architecture-design.md | 99 +++++++++++++++------------
docs/zh/latest/benchmark.md | 10 +--
6 files changed, 109 insertions(+), 98 deletions(-)
diff --git a/docs/en/latest/CHANGELOG.md b/CHANGELOG.md
similarity index 100%
rename from docs/en/latest/CHANGELOG.md
rename to CHANGELOG.md
diff --git a/docs/en/latest/CODE_STYLE.md b/CODE_STYLE.md
similarity index 100%
rename from docs/en/latest/CODE_STYLE.md
rename to CODE_STYLE.md
diff --git a/README.md b/README.md
index 71e2992..4fe3916 100644
--- a/README.md
+++ b/README.md
@@ -65,75 +65,75 @@ A/B testing, canary release, blue-green deployment, limit rate, defense against
- **Multi protocols**
- - [TCP/UDP Proxy](stream-proxy.md): Dynamic TCP/UDP proxy.
- - [Dubbo Proxy](plugins/dubbo-proxy.md): Dynamic HTTP to Dubbo proxy.
- - [Dynamic MQTT Proxy](plugins/mqtt-proxy.md): Supports to load balance MQTT by `client_id`, both support MQTT [3.1.\*](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html), [5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html).
- - [gRPC proxy](grpc-proxy.md): Proxying gRPC traffic.
- - [gRPC transcoding](plugins/grpc-transcode.md): Supports protocol transcoding so that clients can access your gRPC API by using HTTP/JSON.
+ - [TCP/UDP Proxy](docs/en/latest/stream-proxy.md): Dynamic TCP/UDP proxy.
+ - [Dubbo Proxy](docs/en/latest/plugins/dubbo-proxy.md): Dynamic HTTP to Dubbo proxy.
+ - [Dynamic MQTT Proxy](docs/en/latest/plugins/mqtt-proxy.md): Supports to load balance MQTT by `client_id`, both support MQTT [3.1.\*](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html), [5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html).
+ - [gRPC proxy](docs/en/latest/grpc-proxy.md): Proxying gRPC traffic.
+ - [gRPC transcoding](docs/en/latest/plugins/grpc-transcode.md): Supports protocol transcoding so that clients can access your gRPC API by using HTTP/JSON.
- Proxy Websocket
- Proxy Protocol
- Proxy Dubbo: Dubbo Proxy based on Tengine.
- HTTP(S) Forward Proxy
- - [SSL](https.md): Dynamically load an SSL certificate.
+ - [SSL](docs/en/latest/https.md): Dynamically load an SSL certificate.
- **Full dynamic**
- - [Hot Updates And Hot Plugins](plugins.md): Continuously updates its configurations and plugins without restarts!
- - [Proxy Rewrite](plugins/proxy-rewrite.md): Support rewrite the `host`, `uri`, `schema`, `enable_websocket`, `headers` of the request before send to upstream.
- - [Response Rewrite](plugins/response-rewrite.md): Set customized response status code, body and header to the client.
- - [Serverless](plugins/serverless.md): Invoke functions in each phase in APISIX.
+ - [Hot Updates And Hot Plugins](docs/en/latest/plugins.md): Continuously updates its configurations and plugins without restarts!
+ - [Proxy Rewrite](docs/en/latest/plugins/proxy-rewrite.md): Support rewrite the `host`, `uri`, `schema`, `enable_websocket`, `headers` of the request before send to upstream.
+ - [Response Rewrite](docs/en/latest/plugins/response-rewrite.md): Set customized response status code, body and header to the client.
+ - [Serverless](docs/en/latest/plugins/serverless.md): Invoke functions in each phase in APISIX.
- Dynamic Load Balancing: Round-robin load balancing with weight.
- Hash-based Load Balancing: Load balance with consistent hashing sessions.
- - [Health Checks](health-check.md): Enable health check on the upstream node, and will automatically filter unhealthy nodes during load balancing to ensure system stability.
+ - [Health Checks](docs/en/latest/health-check.md): Enable health check on the upstream node, and will automatically filter unhealthy nodes during load balancing to ensure system stability.
- Circuit-Breaker: Intelligent tracking of unhealthy upstream services.
- - [Proxy Mirror](plugins/proxy-mirror.md): Provides the ability to mirror client requests.
- - [Traffic Split](plugins/traffic-split.md): Allows users to incrementally direct percentages of traffic between various upstreams.
+ - [Proxy Mirror](docs/en/latest/plugins/proxy-mirror.md): Provides the ability to mirror client requests.
+ - [Traffic Split](docs/en/latest/plugins/traffic-split.md): Allows users to incrementally direct percentages of traffic between various upstreams.
- **Fine-grained routing**
- - [Supports full path matching and prefix matching](router-radixtree.md#how-to-use-libradixtree-in-apisix)
- - [Support all Nginx built-in variables as conditions for routing](/router-radixtree.md#how-to-filter-route-by-nginx-builtin-variable), so you can use `cookie`, `args`, etc. as routing conditions to implement canary release, A/B testing, etc.
+ - [Supports full path matching and prefix matching](docs/en/latest/router-radixtree.md#how-to-use-libradixtree-in-apisix)
+ - [Support all Nginx built-in variables as conditions for routing](docs/en/latest/router-radixtree.md#how-to-filter-route-by-nginx-builtin-variable), so you can use `cookie`, `args`, etc. as routing conditions to implement canary release, A/B testing, etc.
- Support [various operators as judgment conditions for routing](https://github.com/iresty/lua-resty-radixtree#operator-list), for example `{"arg_age", ">", 24}`
- Support [custom route matching function](https://github.com/iresty/lua-resty-radixtree/blob/master/t/filter-fun.t#L10)
- IPv6: Use IPv6 to match route.
- - Support [TTL](admin-api.md#route)
- - [Support priority](router-radixtree.md#3-match-priority)
- - [Support Batch Http Requests](plugins/batch-requests.md)
+ - Support [TTL](docs/en/latest/admin-api.md#route)
+ - [Support priority](docs/en/latest/router-radixtree.md#3-match-priority)
+ - [Support Batch Http Requests](docs/en/latest/plugins/batch-requests.md)
- **Security**
- - Authentications: [key-auth](plugins/key-auth.md), [JWT](plugins/jwt-auth.md), [basic-auth](plugins/basic-auth.md), [wolf-rbac](plugins/wolf-rbac.md)
- - [IP Whitelist/Blacklist](plugins/ip-restriction.md)
- - [Referer Whitelist/Blacklist](plugins/referer-restriction.md)
- - [IdP](plugins/openid-connect.md): Support external authentication services, such as Auth0, okta, etc., users can use this to connect to OAuth 2.0 and other authentication methods.
- - [Limit-req](plugins/limit-req.md)
- - [Limit-count](plugins/limit-count.md)
- - [Limit-concurrency](plugins/limit-conn.md)
+ - Authentications: [key-auth](docs/en/latest/plugins/key-auth.md), [JWT](docs/en/latest/plugins/jwt-auth.md), [basic-auth](docs/en/latest/plugins/basic-auth.md), [wolf-rbac](docs/en/latest/plugins/wolf-rbac.md)
+ - [IP Whitelist/Blacklist](docs/en/latest/plugins/ip-restriction.md)
+ - [Referer Whitelist/Blacklist](docs/en/latest/plugins/referer-restriction.md)
+ - [IdP](docs/en/latest/plugins/openid-connect.md): Support external authentication services, such as Auth0, okta, etc., users can use this to connect to OAuth 2.0 and other authentication methods.
+ - [Limit-req](docs/en/latest/plugins/limit-req.md)
+ - [Limit-count](docs/en/latest/plugins/limit-count.md)
+ - [Limit-concurrency](docs/en/latest/plugins/limit-conn.md)
- Anti-ReDoS(Regular expression Denial of Service): Built-in policies to Anti ReDoS without configuration.
- - [CORS](plugins/cors.md) Enable CORS(Cross-origin resource sharing) for your API.
- - [URI Blocker](plugins/uri-blocker.md): Block client request by URI.
- - [Request Validator](plugins/request-validation.md)
+ - [CORS](docs/en/latest/plugins/cors.md) Enable CORS(Cross-origin resource sharing) for your API.
+ - [URI Blocker](docs/en/latest/plugins/uri-blocker.md): Block client request by URI.
+ - [Request Validator](docs/en/latest/plugins/request-validation.md)
- **OPS friendly**
- - OpenTracing: support [Apache Skywalking](plugins/skywalking.md) and [Zipkin](plugins/zipkin.md)
- - works with external service discovery:In addition to the built-in etcd, it also supports `Consul` and `Nacos` [DNS discovery mode](https://github.com/apache/apisix/issues/1731#issuecomment-646392129), and [Eureka](discovery.md)
- - Monitoring And Metrics: [Prometheus](plugins/prometheus.md)
- - Clustering: APISIX nodes are stateless, creates clustering of the configuration center, please refer to [etcd Clustering Guide](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/clustering.md).
+ - OpenTracing: support [Apache Skywalking](docs/en/latest/plugins/skywalking.md) and [Zipkin](docs/en/latest/plugins/zipkin.md)
+ - works with external service discovery:In addition to the built-in etcd, it also supports `Consul` and `Nacos` [DNS discovery mode](https://github.com/apache/apisix/issues/1731#issuecomment-646392129), and [Eureka](docs/en/latest/discovery.md)
+ - Monitoring And Metrics: [Prometheus](docs/en/latest/plugins/prometheus.md)
+ - Clustering: APISIX nodes are stateless, creates clustering of the configuration center, please refer to [etcd Clustering Guide](https://etcd.io/docs/v3.4.0/op-guide/clustering/).
- High availability: support to configure multiple etcd addresses in the same cluster.
- [Dashboard](https://github.com/apache/apisix-dashboard)
- Version Control: Supports rollbacks of operations.
- CLI: start\stop\reload APISIX through the command line.
- - [Stand-alone mode](stand-alone.md): Supports to load route rules from local yaml file, it is more friendly such as under the kubernetes(k8s).
- - [Global Rule](architecture-design.md#global-rule): Allows to run any plugin for all request, eg: limit rate, IP filter etc.
+ - [Stand-docs/en/latest/stand-alone.md): Supports to load route rules from local yaml file, it is more friendly such as under the kubernetes(k8s).
+ - [Global Rule](docs/en/latest/architecture-design.md#global-rule): Allows to run any plugin for all request, eg: limit rate, IP filter etc.
- High performance: The single-core QPS reaches 18k with an average delay of less than 0.2 milliseconds.
- - [Fault Injection](plugins/fault-injection.md)
- - [REST Admin API](admin-api.md): Using the REST Admin API to control Apache APISIX, which only allows 127.0.0.1 access by default, you can modify the `allow_admin` field in `conf/config.yaml` to specify a list of IPs that are allowed to call the Admin API. Also note that the Admin API uses key auth to verify the identity of the caller. **The `admin_key` field in `conf/config.yaml` needs to be modified before deployment to ensure security**.
- - External Loggers: Export access logs to external log management tools. ([HTTP Logger](plugins/http-logger.md), [TCP Logger](plugins/tcp-logger.md), [Kafka Logger](plugins/kafka-logger.md), [UDP Logger](plugins/udp-logger.md))
+ - [Fault Injection](docs/en/latest/plugins/fault-injection.md)
+ - [REST Admin API](docs/en/latest/admin-api.md): Using the REST Admin API to control Apache APISIX, which only allows 127.0.0.1 access by default, you can modify the `allow_admin` field in `conf/config.yaml` to specify a list of IPs that are allowed to call the Admin API. Also note that the Admin API uses key auth to verify the identity of the caller. **The `admin_key` field in `conf/config.yaml` needs to be modified before deployment to ensure security**.
+ - External Loggers: Export access logs to external log management tools. ([HTTP Logger](docs/en/latest/plugins/http-logger.md), [TCP Logger](docs/en/latest/plugins/tcp-logger.md), [Kafka Logger](docs/en/latest/plugins/kafka-logger.md), [UDP Logger](docs/en/latest/plugins/udp-logger.md))
- [Helm charts](https://github.com/apache/apisix-helm-chart)
- **Highly scalable**
- - [Custom plugins](plugin-develop.md): Allows hooking of common phases, such as `rewrite`, `access`, `header filter`, `body filter` and `log`, also allows to hook the `balancer` stage.
+ - [Custom plugins](docs/en/latest/plugin-develop.md): Allows hooking of common phases, such as `rewrite`, `access`, `header filter`, `body filter` and `log`, also allows to hook the `balancer` stage.
- Custom load balancing algorithms: You can use custom load balancing algorithms during the `balancer` phase.
- Custom routing: Support users to implement routing algorithms themselves.
@@ -149,7 +149,7 @@ There are several ways to install the Apache Release version of APISIX:
1. Source code compilation (applicable to all systems)
- - Installation runtime dependencies: OpenResty and etcd, and compilation dependencies: luarocks. Refer to [install dependencies documentation](install-dependencies.md)
+ - Installation runtime dependencies: OpenResty and etcd, and compilation dependencies: luarocks. Refer to [install dependencies documentation](docs/en/latest/install-dependencies.md)
- Download the latest source code release package:
```shell
@@ -188,7 +188,7 @@ There are several ways to install the Apache Release version of APISIX:
3. RPM package(only for CentOS 7)
- - Installation runtime dependencies: OpenResty, etcd and OpenSSL develop library, refer to [install dependencies documentation](install-dependencies.md#centos-7)
+ - Installation runtime dependencies: OpenResty, etcd and OpenSSL develop library, refer to [install dependencies documentation](docs/en/latest/install-dependencies.md#centos-7)
- install APISIX:
```shell
@@ -231,17 +231,17 @@ There are several ways to install the Apache Release version of APISIX:
2. Getting started
- The getting started guide is a great way to learn the basics of APISIX, just follow the steps in [Getting Started](getting-started.md).
+ The getting started guide is a great way to learn the basics of APISIX, just follow the steps in [Getting Started](docs/en/latest/getting-started.md).
Further, you can follow the documentation to try more [plugins](README.md#plugins).
3. Admin API
- Apache APISIX provides [REST Admin API](admin-api.md) to dynamic control the Apache APISIX cluster.
+ Apache APISIX provides [REST Admin API](docs/en/latest/admin-api.md) to dynamic control the Apache APISIX cluster.
4. Plugin development
- You can refer to [plugin development guide](plugin-develop.md), and [sample plugin `echo`](plugins/echo.md) documentation and code implementation.
+ You can refer to [plugin development guide](docs/en/latest/plugin-develop.md), and [sample plugin `echo`](docs/en/latest/plugins/echo.md) documentation and code implementation.
Please note that Apache APISIX plugins' added, updated, deleted, etc. are hot loaded, without restarting the service.
@@ -321,7 +321,7 @@ A wide variety of companies and organizations use APISIX for research, productio
<img src="https://raw.githubusercontent.com/api7/website-of-API7/master/user-wall.jpg" width="900" height="500" />
-Users are encouraged to add themselves to the [Powered By](powered-by.md) page.
+Users are encouraged to add themselves to the [Powered By](docs/en/latest/powered-by.md) page.
## Landscape
diff --git a/docs/en/latest/config.json b/docs/en/latest/config.json
index 5fc9235..e217436 100644
--- a/docs/en/latest/config.json
+++ b/docs/en/latest/config.json
@@ -140,8 +140,9 @@
"id": "benchmark"
},
{
- "type": "doc",
- "id": "CODE_STYLE"
+ "type": "link",
+ "label": "CODE_STYLE",
+ "href": "https://github.com/apache/apisix/blob/master/CODE_STYLE"
},
{
"type": "doc",
@@ -152,8 +153,9 @@
"id": "FAQ"
},
{
- "type": "doc",
- "id": "CHANGELOG"
+ "type": "link",
+ "label": "CHANGELOG",
+ "href": "https://github.com/apache/apisix/blob/master/CHANGELOG"
}
]
}
diff --git a/docs/zh/latest/architecture-design.md b/docs/zh/latest/architecture-design.md
index d33705f..ba836bb 100644
--- a/docs/zh/latest/architecture-design.md
+++ b/docs/zh/latest/architecture-design.md
@@ -23,18 +23,27 @@ title: 架构设计
## 目录
-- [**APISIX**](#apisix)
-- [**APISIX Config**](#apisix-config)
-- [**Route**](#route)
-- [**Service**](#service)
-- [**Plugin**](#plugin)
-- [**Script**](#script)
-- [**Upstream**](#upstream)
-- [**Router**](#router)
-- [**Consumer**](#consumer-1)
-- [**Global Rule**](#global-rule)
-- [**Plugin Config**](#plugin-config)
-- [**Debug mode**](#debug-mode)
+- [目录](#目录)
+- [APISIX](#apisix)
+ - [插件加载流程](#插件加载流程)
+ - [插件内部结构](#插件内部结构)
+- [APISIX Config](#apisix-config)
+- [Route](#route)
+- [Service](#service)
+- [Plugin](#plugin)
+- [Script](#script)
+- [Upstream](#upstream)
+ - [配置参数](#配置参数)
+ - [Consumer](#consumer)
+ - [Cookie](#cookie)
+ - [Header](#header)
+- [Router](#router)
+- [Consumer](#consumer-1)
+- [Global Rule](#global-rule)
+- [Plugin Config](#plugin-config)
+- [Debug mode](#debug-mode)
+ - [基本调试模式](#基本调试模式)
+ - [高级调试模式](#高级调试模式)
## APISIX
@@ -44,7 +53,7 @@ title: 架构设计
### 插件内部结构
-<img src="../../assets/images/flow-plugin-internal.png" width="50%" height="50%">
+<img src="../../assets/images/flow-plugin-internal.png" width="50%" height="50%" />
## APISIX Config
@@ -54,7 +63,7 @@ title: 架构设计
```yaml
apisix:
- node_listen: 8000 # APISIX listening port
+ node_listen: 8000 # APISIX listening port
```
比如指定 APISIX 默认监听端口为 8000,并且设置 etcd 地址为 `http://foo:2379`,
@@ -62,16 +71,16 @@ apisix:
```yaml
apisix:
- node_listen: 8000 # APISIX listening port
+ node_listen: 8000 # APISIX listening port
etcd:
- host: "http://foo:2379" # etcd address
+ host: "http://foo:2379" # etcd address
```
其他默认配置,可以在 `conf/config-default.yaml` 文件中看到,该文件是与 APISIX 源码强绑定,
**永远不要**手工修改 `conf/config-default.yaml` 文件。如果需要自定义任何配置,都应在 `config.yaml` 文件中完成。
-*注意* 不要手工修改 APISIX 自身的 `conf/nginx.conf` 文件,当服务每次启动时,`apisix`
+_注意_ 不要手工修改 APISIX 自身的 `conf/nginx.conf` 文件,当服务每次启动时,`apisix`
会根据 `config.yaml` 配置自动生成新的 `conf/nginx.conf` 并自动启动服务。
[返回目录](#目录)
@@ -84,7 +93,7 @@ Route 字面意思就是路由,通过定义一些规则来匹配客户端的
Route 中主要包含三部分内容:匹配规则(比如 uri、host、remote_addr 等),插件配置(限流限速等)和上游信息。
请看下图示例,是一些 Route 规则的实例,当某些属性值相同时,图中用相同颜色标识。
-<img src="../../assets/images/routes-example.png" width="50%" height="50%">
+<img src="../../assets/images/routes-example.png" width="50%" height="50%" />
我们直接在 Route 中完成所有参数的配置,优点是容易设置,每个 Route 都相对独立自由度比较高。但当我们的 Route 有比较多的重复配置(比如启用相同的插件配置或上游信息),一旦我们要更新这些相同属性时,就需要遍历所有 Route 并进行修改,给后期管理维护增加不少复杂度。
@@ -125,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%">
+<img src="../../assets/images/service-example.png" width="50%" height="50%" />
不同 Route 规则同时绑定到一个 Service 上,这些 Route 将具有相同的上游和插件配置,减少冗余配置。
@@ -269,7 +278,7 @@ local _M = {
Upstream 是虚拟主机抽象,对给定的多个服务节点按照配置规则进行负载均衡。Upstream 的地址信息可以直接配置到 `Route`(或 `Service`) 上,当 Upstream 有重复时,就需要用“引用”方式避免重复了。
-<img src="../../assets/images/upstream-example.png" width="50%" height="50%">
+<img src="../../assets/images/upstream-example.png" width="50%" height="50%" />
如上图所示,通过创建 Upstream 对象,在 `Route` 用 ID 方式引用,就可以确保只维护一个对象的值了。
@@ -373,7 +382,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
#### Consumer
-创建一个consumer对象:
+创建一个 consumer 对象:
```shell
curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
@@ -473,17 +482,18 @@ APISIX 区别于其他 API 网关的一大特点是允许用户选择不同 Rout
在本地配置 `conf/config.yaml` 中设置最符合自身业务需求的路由。
-* `apisix.router.http`: HTTP 请求路由。
- * `radixtree_uri`: (默认)只使用 `uri` 作为主索引。基于 `radixtree` 引擎,支持全量和深前缀匹配,更多见 [如何使用 router-radixtree](../router-radixtree.md)。
- * `绝对匹配`:完整匹配给定的 `uri` ,比如 `/foo/bar`,`/foo/glo`。
- * `前缀匹配`:末尾使用 `*` 代表给定的 `uri` 是前缀匹配。比如 `/foo*`,则允许匹配 `/foo/`、`/foo/a`和`/foo/b`等。
- * `匹配优先级`:优先尝试绝对匹配,若无法命中绝对匹配,再尝试前缀匹配。
- * `任意过滤属性`:允许指定任何 Nginx 内置变量作为过滤条件,比如 URL 请求参数、请求头、cookie 等。
- * `radixtree_uri_with_parameter`: 同 `radixtree_uri` 但额外有参数匹配的功能。
- * `radixtree_host_uri`: 使用 `host + uri` 作为主索引(基于 `radixtree` 引擎),对当前请求会同时匹配 host 和 uri,支持的匹配条件与 `radixtree_uri` 基本一致。
+- `apisix.router.http`: HTTP 请求路由。
-* `apisix.router.ssl`: SSL 加载匹配路由。
- * `radixtree_sni`: (默认)使用 `SNI` (Server Name Indication) 作为主索引(基于 radixtree 引擎)。
+ - `radixtree_uri`: (默认)只使用 `uri` 作为主索引。基于 `radixtree` 引擎,支持全量和深前缀匹配,更多见 [如何使用 router-radixtree](../router-radixtree.md)。
+ - `绝对匹配`:完整匹配给定的 `uri` ,比如 `/foo/bar`,`/foo/glo`。
+ - `前缀匹配`:末尾使用 `*` 代表给定的 `uri` 是前缀匹配。比如 `/foo*`,则允许匹配 `/foo/`、`/foo/a`和`/foo/b`等。
+ - `匹配优先级`:优先尝试绝对匹配,若无法命中绝对匹配,再尝试前缀匹配。
+ - `任意过滤属性`:允许指定任何 Nginx 内置变量作为过滤条件,比如 URL 请求参数、请求头、cookie 等。
+ - `radixtree_uri_with_parameter`: 同 `radixtree_uri` 但额外有参数匹配的功能。
+ - `radixtree_host_uri`: 使用 `host + uri` 作为主索引(基于 `radixtree` 引擎),对当前请求会同时匹配 host 和 uri,支持的匹配条件与 `radixtree_uri` 基本一致。
+
+- `apisix.router.ssl`: SSL 加载匹配路由。
+ - `radixtree_sni`: (默认)使用 `SNI` (Server Name Indication) 作为主索引(基于 radixtree 引擎)。
[返回目录](#目录)
@@ -492,7 +502,7 @@ APISIX 区别于其他 API 网关的一大特点是允许用户选择不同 Rout
对于 API 网关通常可以用请求域名、客户端 IP 地址等字段识别到某类请求方,
然后进行插件过滤并转发请求到指定上游,但有时候这个深度不够。
-<img src="../../assets/images/consumer-who.png" width="50%" height="50%">
+<img src="../../assets/images/consumer-who.png" width="50%" height="50%" />
如上图所示,作为 API 网关,需要知道 API Consumer(消费方)具体是谁,这样就可以对不同 API Consumer 配置不同规则。
@@ -503,7 +513,7 @@ APISIX 区别于其他 API 网关的一大特点是允许用户选择不同 Rout
在 APISIX 中,识别 Consumer 的过程如下图:
-<img src="../../assets/images/consumer-internal.png" width="50%" height="50%">
+<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 对象的唯一识别标识。
@@ -563,7 +573,7 @@ HTTP/1.1 503 Service Temporarily Unavailable
```
-结合 [consumer-restriction](plugins/consumer-restriction.md) 插件,限制jack对该 route 的访问
+结合 [consumer-restriction](plugins/consumer-restriction.md) 插件,限制 jack 对该 route 的访问
```shell
# 设置黑名单,禁止jack访问该API
@@ -689,7 +699,7 @@ $ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f
}
```
-+
+-
```
{
@@ -796,19 +806,18 @@ hello world
```yaml
hook_conf:
- enable: false # 是否开启 hook 追踪调试
- name: hook_phase # 开启 hook 追踪调试的模块列表名称
- log_level: warn # 日志级别
- is_print_input_args: true # 是否打印输入参数
- is_print_return_value: true # 是否打印返回值
-
-hook_phase: # 模块函数列表,名字:hook_phase
- apisix: # 引用的模块名称
- - http_access_phase # 函数名:数组
+ enable: false # 是否开启 hook 追踪调试
+ name: hook_phase # 开启 hook 追踪调试的模块列表名称
+ log_level: warn # 日志级别
+ is_print_input_args: true # 是否打印输入参数
+ is_print_return_value: true # 是否打印返回值
+
+hook_phase: # 模块函数列表,名字:hook_phase
+ apisix: # 引用的模块名称
+ - http_access_phase # 函数名:数组
- http_header_filter_phase
- http_body_filter_phase
- http_log_phase
-
#END
```
diff --git a/docs/zh/latest/benchmark.md b/docs/zh/latest/benchmark.md
index 9eff6b0..27b64f9 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%">
+<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/latency-1.jpg" width="70%" height="70%" />
#### 火焰图
火焰图的采样结果:
-<img src="../../assets/images/flamegraph-1.jpg">
+<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%">
+<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%">
+<img src="../../assets/images/latency-2.jpg" width="70%" height="70%" />
#### 火焰图