You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by de...@apache.org on 2021/07/18 04:44:36 UTC

[incubator-shenyu-website] branch main updated: [ISSUE #117] update develpoer doc (#118)

This is an automated email from the ASF dual-hosted git repository.

dengliming pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 1bb3870  [ISSUE #117] update develpoer doc (#118)
1bb3870 is described below

commit 1bb3870cb60a0404d3c3ed02414b997d9b4d4a2f
Author: midnight2104 <33...@qq.com>
AuthorDate: Sun Jul 18 12:44:28 2021 +0800

    [ISSUE #117] update develpoer doc (#118)
    
    * Update the quick-start document.
    
    * update user document for ShenYu.
    
    * update data sync and register center doc
    
    * Update the URL link in the document.
    
    * Update rpc proxy  document.
    
    * Update update circuit breaker and current limiting  document.
    
    * update developer doc.
---
 content/zh/projects/shenyu/_index.md               |   6 +-
 .../projects/shenyu/authority-management/index.md  |   8 +--
 content/zh/projects/shenyu/custom-filter/index.md  |  14 ++---
 .../shenyu/custom-parsing-ip-and-host/index.md     |  16 +++---
 content/zh/projects/shenyu/custom-plugin/index.md  |  61 +++++++++++----------
 content/zh/projects/shenyu/custom-result/index.md  |  19 ++++---
 .../projects/shenyu/custom-sign-algorithm/index.md |  10 ++--
 .../shenyu/developer-shenyu-client/index.md        |  13 +++--
 content/zh/projects/shenyu/file-and-image/index.md |   8 +--
 content/zh/projects/shenyu/logging-plugin/index.md |  29 ++++++----
 content/zh/projects/shenyu/monitor-plugin/index.md |  38 +++++++------
 .../zh/projects/shenyu/shenyu-optimize/index.md    |  14 ++---
 content/zh/projects/shenyu/spi-design/index.md     |  37 ++++++++++++-
 content/zh/projects/shenyu/thread/index.md         |  10 ++--
 static/img/shenyu/plugin/logging/logging-1.png     | Bin 0 -> 103331 bytes
 static/img/shenyu/plugin/monitor/monitor-1.png     | Bin 0 -> 109729 bytes
 16 files changed, 166 insertions(+), 117 deletions(-)

diff --git a/content/zh/projects/shenyu/_index.md b/content/zh/projects/shenyu/_index.md
index 68b5223..da13db6 100644
--- a/content/zh/projects/shenyu/_index.md
+++ b/content/zh/projects/shenyu/_index.md
@@ -161,7 +161,7 @@ sidebar:
             link: 'logging-plugin'
   - title: '开发者文档'
     sub:
-      - title: '自定义filter'
+      - title: '自定义Filter'
         link: 'custom-filter'
       - title: '自定义插件'
         link: 'custom-plugin'
@@ -173,11 +173,11 @@ sidebar:
         link: 'custom-result'
       - title: '自定义签名插件算法与验证'
         link: 'custom-sign-algorithm' 
-      - title: '多语言http客户端接入'
+      - title: '多语言Http客户端接入'
         link: 'developer-shenyu-client'
       - title: '线程模型'
         link: 'thread'
-      - title: 'shenyu调优'
+      - title: 'ShenYu调优'
         link: 'shenyu-optimize'
       - title: 'SPI'
         link: 'spi-design'
diff --git a/content/zh/projects/shenyu/authority-management/index.md b/content/zh/projects/shenyu/authority-management/index.md
index cc56cf8..5edbf69 100644
--- a/content/zh/projects/shenyu/authority-management/index.md
+++ b/content/zh/projects/shenyu/authority-management/index.md
@@ -6,16 +6,16 @@ description: 权限管理详解
 
 ## 说明
 
-- 管理和控制经过 ShenYu 网关的请求的权限。
-- 生成的 `AK/SK` ,配合 `sign` 插件使用,实现基于URI级别的精准权限管控。
+- 管理和控制经过 `ShenYu` 网关的请求的权限。
+- 生成的 `AK/SK` ,配合 `sign` 插件使用,实现基于`URI`级别的精准权限管控。
 
 ## 使用教程
 
-#### 第一步,我们可以直接在 `基础配置` -- `认证管理` 新增一条认证信息
+ 第一步,我们可以直接在 `基础配置` --> `认证管理` 新增一条认证信息
 
 <img src="/img/shenyu/basicConfig/authorityManagement/auth_manages_add_zh.jpg" width="100%" height="70%" />
 
-#### 第二步,配置这条认证信息
+ 第二步,配置这条认证信息
 
 <img src="/img/shenyu/basicConfig/authorityManagement/auth_param_zh.jpg" width="50%" height="40%"/>
 
diff --git a/content/zh/projects/shenyu/custom-filter/index.md b/content/zh/projects/shenyu/custom-filter/index.md
index f654f1b..b54c9e4 100644
--- a/content/zh/projects/shenyu/custom-filter/index.md
+++ b/content/zh/projects/shenyu/custom-filter/index.md
@@ -7,11 +7,11 @@ description: filter扩展
 
 ## 说明
 
-* 本文是说明如何进行 `org.springframework.web.server.WebFliter` 的扩展。
+* 本文介绍如何对 `org.springframework.web.server.WebFliter` 进行扩展。
 
 ## 跨域支持
 
-* 新增 `org.apache.shenyu.web.filter.CrossFilter` 实现 WebFilter。
+* 新增 `org.apache.shenyu.web.filter.CrossFilter` 实现 `WebFilter`。
 
  ```java
  public class CrossFilter implements WebFilter {
@@ -48,7 +48,8 @@ description: filter扩展
      }
  }
 ```
-* 将 CrossFilter 注册成为 spring的bean,完事。
+
+* 将 `CrossFilter` 注册成为 `Spring`的`bean`。
 
 
 ## 网关过滤 springboot健康检查
@@ -81,9 +82,7 @@ public final class HealthFilter implements WebFilter {
 
 ## 继承 `org.apache.shenyu.web.filter.AbstractWebFilter`
 
-* 新增一个类,继承它。
-
-* 实现它的2个方法。
+* 新增一个类继承`AbstractWebFilter`,并实现它的两个方法。
 
 ```java
    /**
@@ -103,7 +102,8 @@ public final class HealthFilter implements WebFilter {
      */
     protected abstract Mono<Void> doDenyResponse(ServerWebExchange exchange);
 ```
-* `doFilter` 方法返回 Mono<true> 表示通过,反之则不通过,不通过的时候,会调用 `doDenyResponse`输出相关信息到前端。
+
+* `doFilter` 方法返回 `Mono<true>` 表示通过,反之则不通过,不通过的时候,会调用 `doDenyResponse`输出相关信息到前端。
 
 
 
diff --git a/content/zh/projects/shenyu/custom-parsing-ip-and-host/index.md b/content/zh/projects/shenyu/custom-parsing-ip-and-host/index.md
index 141c465..1f5126c 100644
--- a/content/zh/projects/shenyu/custom-parsing-ip-and-host/index.md
+++ b/content/zh/projects/shenyu/custom-parsing-ip-and-host/index.md
@@ -1,24 +1,24 @@
 ---
-title: 正确获取Ip与host
+title: 正确获取IP与Host
 keywords: ShenYu
 description: 正确获取Ip与host
 ---
 
 ## 说明
 
-* 本文是说明,如果网关前面有一层`nginx` 的时候,如何获取正确的ip与端口。
-* 获取正确的之后,在插件以及选择器中,可以根据 ip,与host来进行匹配。
+* 本文是说明,如果网关前面有一层`nginx` 的时候,如何获取正确的`ip`与端口。
+* 获取正确的之后,在插件以及选择器中,可以根据 `ip`,与`host`来进行匹配。
 
 ## 默认实现
 
-* 在 ShenYu 网关自带实现为:`org.apache.shenyu.web.forward.ForwardedRemoteAddressResolver`。
+* 在 `ShenYu` 网关自带实现为:`org.apache.shenyu.web.forward.ForwardedRemoteAddressResolver`。
 
-* 它需要你在 `nginx` 设置 `X-Forwarded-For`,以便来获取正确的 ip 与 host。
+* 它需要你在 `nginx` 设置 `X-Forwarded-For`,以便来获取正确的 `ip` 与 `host`。
 
 
 ## 扩展实现
 
-* 新增一个类A,实现`org.apache.shenyu.plugin.api.RemoteAddressResolver`
+* 新增一个类 `CustomRemoteAddressResolver`,实现`org.apache.shenyu.plugin.api.RemoteAddressResolver`
 
 ```java
 public interface RemoteAddressResolver {
@@ -40,8 +40,8 @@ public interface RemoteAddressResolver {
 
 ```java
    @Bean
-   public SignService a() {
-         return new A
+   public SignService customRemoteAddressResolver() {
+         return new CustomRemoteAddressResolver();
    }
 ```
 
diff --git a/content/zh/projects/shenyu/custom-plugin/index.md b/content/zh/projects/shenyu/custom-plugin/index.md
index b470cda..d45f0b9 100644
--- a/content/zh/projects/shenyu/custom-plugin/index.md
+++ b/content/zh/projects/shenyu/custom-plugin/index.md
@@ -6,25 +6,25 @@ description: 插件扩展
 
 ## 说明
 
-* 插件是 ShenYu 网关的核心执行者,每个插件在开启的情况下,都会对匹配的流量,进行自己的处理。
-* 在 ShenYu 网关里面,插件其实分为2 类。
+* 插件是 `ShenYu` 网关的核心执行者,每个插件在开启的情况下,都会对匹配的流量,进行自己的处理。
+* 在 `ShenYu` 网关里面,插件分为两类。
   * 一类是单一职责的调用链,不能对流量进行自定义的筛选。
-  * 另一类,能对匹配的流量,执行自己的职责调用链。
-* 用户可以参考 shenyu-plugin 模块,新增自己的插件处理,如果有好的公用插件,请把代码提交上来。
+  * 一类是能对匹配的流量,执行自己的职责调用链。
+* 用户可以参考 [shenyu-plugin](https://github.com/apache/incubator-shenyu/tree/master/shenyu-plugin) 模块,新增自己的插件处理,如果有好的公用插件,可以向官网提交`pr`。
 
 ## 单一职责插件
 
 * 引入如下依赖:
 
 ```
- <dependency>
-        <groupId>org.apache.shenyu</groupId>
-        <artifactId>shenyu-plugin-api</artifactId>
-        <version>${last.version}</version>
-  </dependency>
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-plugin-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 ```
 
-* 用户新增一个类 A,直接实现 `org.apache.shenyu.plugin.api.ShenyuPlugin`
+* 用户新增一个类 `MyShenyuPlugin`,直接实现 `org.apache.shenyu.plugin.api.ShenyuPlugin`
 
 ```java
 public interface ShenyuPlugin {
@@ -82,12 +82,12 @@ public interface ShenyuPlugin {
    * `skip()` 在特定的条件下,该插件是否被跳过。
 
 
-* 注册成Spring的bean,参考如下,或者直接在实现类上加 `@Component` 注解。
+* 注册成`Spring`的`bean`,参考如下,或者直接在实现类上加 `@Component` 注解。
 
 ```java
     @Bean
-    public ShenyuPlugin a() {
-        return new A();
+    public ShenyuPlugin myShenyuPlugin() {
+        return new MyShenyuPlugin();
     }
 ```
 
@@ -96,13 +96,13 @@ public interface ShenyuPlugin {
 
 * 引入如下依赖:
 ```xml
- <dependency>
-        <groupId>org.apache.shenyu</groupId>
-        <artifactId>shenyu-plugin-base</artifactId>
-        <version>${last.version}</version>
-  </dependency>
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-plugin-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 ```
-* 新增一个类A,继承 `org.apache.shenyu.plugin.base.AbstractShenyuPlugin`
+* 新增一个类 `CustomPlugin`,继承 `org.apache.shenyu.plugin.base.AbstractShenyuPlugin`
 
 * 以下是参考:
 
@@ -179,26 +179,26 @@ public class CustomPlugin extends AbstractShenyuPlugin {
 
 * 详细讲解:
 
-   * 继承该类的插件,插件会进行选择器规则匹配,那如何来设置呢?
+   * 继承该类的插件,插件会进行选择器规则匹配。
 
-   * 首先在 `shenyu-admin` 后台 -->插件管理中,新增一个插件,注意 名称与 你自定义插件的 `named()` 方法要一致。
+   * 首先在 `shenyu-admin` 后台管理系统 --> 基础配置 --> 插件管理 中,新增一个插件,注意 名称与 你自定义插件的 `named()` 方法要一致。
 
-   * 重新登陆  `shenyu-admin` 后台 ,你会发现在插件列表就多了一个你刚新增的插件,你就可以进行选择器规则匹配
+   * 重新登陆  `shenyu-admin` 后台,可以看见刚新增的插件,然后就可以进行选择器规则匹配。
 
-   * 在规则中,有个 `handler` 字段,是你自定义处理数据,在 `doExecute()` 方法中,通过 ` final String ruleHandle = rule.getHandle();` 获取,然后进行你的操作。
+   * 在规则中,有个 `handler` 字段,是自定义处理数据,在 `doExecute()` 方法中,通过 ` final String ruleHandle = rule.getHandle();` 获取,然后进行你的操作。
 
-* 注册成Spring的bean,参考如下或者直接在实现类上加 `@Component` 注解。
+* 注册成`Spring`的`bean`,参考如下或者直接在实现类上加 `@Component` 注解。
 
 ```java
     @Bean
-    public ShenyuPlugin a() {
-        return new A();
+    public ShenyuPlugin customPlugin() {
+        return new CustomPlugin();
     }
 ```
 
 ## 订阅你的插件数据,进行自定义的处理
 
-* 新增一个类A,实现 `org.apache.shenyu.plugin.base.handler.PluginDataHandler`
+* 新增一个类 `PluginDataHandler`,实现 `org.apache.shenyu.plugin.base.handler.PluginDataHandler`
 
 ```java
 public interface PluginDataHandler {
@@ -263,10 +263,11 @@ public interface PluginDataHandler {
 
 * 注意 `pluginNamed()` 要和你自定义的插件名称相同。
 
-* 注册成Spring的bean,参考如下或者直接在实现类上加 `@Component` 注解。
+* 注册成`Spring`的`bean`,参考如下或者直接在实现类上加 `@Component` 注解。
+
 ```java
     @Bean
-    public PluginDataHandler a() {
-        return new A();
+    public PluginDataHandler pluginDataHandler() {
+        return new PluginDataHandler();
     }
 ```
diff --git a/content/zh/projects/shenyu/custom-result/index.md b/content/zh/projects/shenyu/custom-result/index.md
index f1cd876..17cab99 100644
--- a/content/zh/projects/shenyu/custom-result/index.md
+++ b/content/zh/projects/shenyu/custom-result/index.md
@@ -1,13 +1,13 @@
 ---
-title: 自定义网关返回数据格式
+title: 自定义返回结果
 keywords: shenyu
 description: 自定义网关返回数据格式
 ---
 
 ## 说明
 
-* 本文是说明基于 ShenYu 网关返回自定义的数据个数。
-* 网关需要统一的返回格式,而每个公司都有自己定义的一套,所以需要对次进行扩展。
+* 本文介绍基于 `ShenYu` 网关返回自定义的数据格式。
+* 网关需要统一的返回格式,如果需要自己定义格式,可以进行扩展。
 
 
 ## 默认实现
@@ -30,7 +30,8 @@ public class ShenyuDefaultEntity implements Serializable {
 }
 ```
 
-* 返回的json 格式如下:
+* 返回的 `json` 格式如下:
+
 ```json
 {
     "code": -100, //返回码,
@@ -41,7 +42,7 @@ public class ShenyuDefaultEntity implements Serializable {
 
 ## 扩展
 
-*  新增一个类 A 实现 `org.apache.shenyu.plugin.api.result.ShenyuResult`
+*  新增一个类 `CustomShenyuResult` 实现 `org.apache.shenyu.plugin.api.result.ShenyuResult`
 
 ```java
  public interface ShenyuResult<T> {
@@ -69,14 +70,14 @@ public class ShenyuDefaultEntity implements Serializable {
 
 ```
 
-* 其他 泛型 T 为你自定义的数据格式,返回它就好
+* 其中泛型 `T` 为自定义的数据格式,返回它就好。
 
-* 把你新增的实现类注册成为spring的bean,如下
+* 把你新增的实现类注册成为`Spring`的`bean`,如下:
 
 ```java
     @Bean
-    public ShenyuResult a() {
-          return new A();
+    public ShenyuResult customShenyuResult() {
+          return new CustomShenyuResult();
     }
 ```
 
diff --git a/content/zh/projects/shenyu/custom-sign-algorithm/index.md b/content/zh/projects/shenyu/custom-sign-algorithm/index.md
index fa4dc77..919bf56 100644
--- a/content/zh/projects/shenyu/custom-sign-algorithm/index.md
+++ b/content/zh/projects/shenyu/custom-sign-algorithm/index.md
@@ -13,7 +13,7 @@ description: 自定义sign插件检验
 
 *  默认的实现为 `org.apache.shenyu.plugin.sign.service.DefaultSignService`。
 
-*  新增一个类 A 实现  `org.apache.shenyu.plugin.api.SignService`。
+*  新增一个类 `CustomSignService` 实现  `org.apache.shenyu.plugin.api.SignService`。
 
 ```java
  public interface SignService {
@@ -29,14 +29,14 @@ description: 自定义sign插件检验
 
 ```
 
-* Pair中返回true,表示验证通过,为false的时候,会把String中的信息输出到前端。
+* `Pair`中返回`true`,表示验证通过,为`false`的时候,会把`String`中的信息输出到前端。
 
-* 把你新增的实现类注册成为spring的bean,如下
+* 把新增的实现类注册成为`Spring`的`bean`,如下
 
 ```java
    @Bean
-   public SignService a() {
-         return new A
+   public SignService customSignService() {
+         return new CustomSignService();
    }
 ```
 
diff --git a/content/zh/projects/shenyu/developer-shenyu-client/index.md b/content/zh/projects/shenyu/developer-shenyu-client/index.md
index 9b9b367..6d24d76 100644
--- a/content/zh/projects/shenyu/developer-shenyu-client/index.md
+++ b/content/zh/projects/shenyu/developer-shenyu-client/index.md
@@ -1,19 +1,22 @@
 ---
-title: 多语言http客户端
+title: 多语言Http客户端
 keywords: shenyu
 description: 多语言http客户端
 ---
 
 ## 说明
 
-* 本文主要讲解其他语言的http服务如何接入网关。
-* 如何自定义开发 shenyu-http-client。
+* 本文主要讲解其他语言的`http`服务如何接入网关。
+* 如何自定义开发`shenyu-http-client`。
 
 ## 自定义开发
 
 * 请求方式:`POST`
-* 请求路径:`http://shenyu-admin/shenyu-client/springmvc-register`  shenyu-admin,表示为 admin的 ip + port
-* 请求参数:shenyu网关默认的需要参数,通过body里面传,json类型。
+* 请求路径:`http://shenyu-admin/shenyu-client/springmvc-register` ,  其中 `shenyu-admin` 表示为 admin后台管理系统的 `ip + port` 。
+
+
+* 请求参数:`shenyu`网关默认的需要参数,通过`body`里面传入,`json`类型。
+
 ```json
 {
 	"appName": "xxx", //应用名称 必填
diff --git a/content/zh/projects/shenyu/file-and-image/index.md b/content/zh/projects/shenyu/file-and-image/index.md
index 541d3dc..5319149 100644
--- a/content/zh/projects/shenyu/file-and-image/index.md
+++ b/content/zh/projects/shenyu/file-and-image/index.md
@@ -6,14 +6,14 @@ description: 文件上传下载
 
 ## 说明
 
-* 本文主要介绍 ShenYu 的文件上传下载的支持。
+* 本文主要介绍 `ShenYu` 的文件上传下载的支持。
 
 ## 文件上传
 
-* 默认限制文件大小为10M。
-* 如果想修改,在启动服务的时候,使用`--file.size = 30`,为int 类型。
+* 默认限制文件大小为`10M`。
+* 如果想修改,在启动服务的时候,使用`--file.size = 30`,为`int`类型。
 * 你之前怎么上传文件,还是怎么上传。
 
 ## 文件下载
 
-* ShenYu 支持流的方式进行下载,你之前的接口怎么写的,还是怎么写,根本不需要变。
+* `ShenYu` 支持流的方式进行下载,之前的接口怎么写的,现在还是怎么写,根本不需要变。
diff --git a/content/zh/projects/shenyu/logging-plugin/index.md b/content/zh/projects/shenyu/logging-plugin/index.md
index ca315e5..1aee157 100644
--- a/content/zh/projects/shenyu/logging-plugin/index.md
+++ b/content/zh/projects/shenyu/logging-plugin/index.md
@@ -6,25 +6,32 @@ description: logging插件
 
 ## 说明
 
-* ShenYu 网关在对目标服务调用的时候,还容许用户使用 `logging` 插件在日志中打印本次请求信息,包含请求路径、请求方法、请求参数和响应头、响应体等信息。
+* `ShenYu` 网关在对目标服务调用的时候,还容许用户使用 `logging` 插件在日志中打印本次请求信息,包含请求路径、请求方法、请求参数和响应头、响应体等信息。
 
 ## 插件设置
 
-* 在 `shenyu-admin` --> 插件管理 --> `logging` 设置为开启。
-* 在网关的 pom.xml 文件中添加 `logging` 的支持。
+* 在 `shenyu-admin`--> 基础配置 --> 插件管理-> `logging` ,设置为开启。
+
 * 如果用户不需要,可以把插件禁用。
 
+
+<img src="/img/shenyu/plugin/logging/logging-1.png" width="70%" height="60%" />
+
+
+* 在网关的 `pom.xml` 文件中添加 `logging` 的支持。
+
+
 ```xml
-  <!-- shenyu logging plugin start-->
-  <dependency>
-    <groupId>org.apache.shenyu</groupId>
-    <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
-    <version>${last.version}</version>
-  </dependency>
-  <!-- shenyu logging plugin end-->
+        <!--shenyu debug plugin start-->
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--shenyu debug plugin end-->
 ```
 
-* 选择器和规则,请详细看:[选择器规则](../selector-and-rule)。
+* 选择器和规则配置,请参考: [选择器和规则管理](../selector-and-rule)。
 * 只有匹配的请求,并且配置规则才会打印本次请求相关信息。
 
 ## 场景
diff --git a/content/zh/projects/shenyu/monitor-plugin/index.md b/content/zh/projects/shenyu/monitor-plugin/index.md
index d09752d..6a21386 100644
--- a/content/zh/projects/shenyu/monitor-plugin/index.md
+++ b/content/zh/projects/shenyu/monitor-plugin/index.md
@@ -6,22 +6,22 @@ description: monitor插件
 
 ## 说明
 
-* monitor插件是网关用来监控自身运行状态(JVM相关),请求的响应迟延,QPS、TPS等相关metrics。
+* `monitor`插件是网关用来监控自身运行状态(`JVM`相关),请求的响应迟延,`QPS`、`TPS`等相关`metrics`。
 
 ## 技术方案
 
 * 流程图
     ![](/img/shenyu/plugin/monitor/shenyu-metrics.png)
 
-* 异步或者同步的方式,在 ShenYu 网关里面进行 `metrics` 埋点。
+* 异步或者同步的方式,在 `ShenYu` 网关里面进行 `metrics` 埋点。
 
-* `prometheus` 服务端通过 http 请求 来 拉取  `metrics`,再使用 `Grafana ` 展示。
+* `prometheus` 服务端通过 `http` 请求来拉取  `metrics`,再使用 `Grafana ` 展示。
 
 ## 插件设置
 
-* 在 `shenyu-admin`--> 插件管理-> monitor ,设置为开启。
+* 在 `shenyu-admin`--> 基础配置 --> 插件管理-> `monitor` ,设置为开启。
 
-* 在 monitor 插件中新增以下配置
+* 在 `monitor` 插件中新增以下配置:
 
 ```yaml
 {"metricsName":"prometheus","host":"localhost","port":"9191","async":"true"}
@@ -33,26 +33,28 @@ description: monitor插件
 
 * 如果用户不使用,则在 `shenyu-admin` 后台把此插件停用。
 
+<img src="/img/shenyu/plugin/monitor/monitor-1.png" width="70%" height="60%" />
+
+
 ## 插件使用
 
-* 在网关的 pom.xml 文件中添加 `monitor` 的支持。
+* 在网关的 `pom.xml` 文件中添加 `monitor` 的依赖。
 
 ```xml
-  <!-- shenyu monitor plugin start-->
-  <dependency>
-      <groupId>org.apache.shenyu</groupId>
-      <artifactId>shenyu-spring-boot-starter-plugin-monitor</artifactId>
-      <version>${last.version}</version>
-  </dependency>
-  <!-- shenyu monitor plugin end-->
+        <!-- shenyu monitor plugin starter-->
+        <dependency>
+            <groupId>org.apache.shenyu</groupId>
+            <artifactId>shenyu-spring-boot-starter-plugin-monitor</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!-- shenyu monitor plugin end-->
 ```
-* 选择器和规则,请详细看 : [选择器规则](../selector-and-rule)。
-
-   * 只有当匹配的url,才会进行url请求埋点。
+* 选择器和规则配置,请参考: [选择器和规则管理](../selector-and-rule)。
+* 只有当匹配的`url`,才会进行`url`请求埋点。
 
 ## metrics信息
 
-* 所有的JVM,线程,内存,等相关信息都会埋点,可以在 `Granfana ` 面板中,新增一个 JVM 模块,则会完全展示 具体请看:https://github.com/prometheus/jmx_exporter
+* 所有的`JVM`,线程,内存,等相关信息都会埋点,可以在 `Granfana ` 面板中,新增一个 `JVM` 模块,则会完全展示 具体请看:https://github.com/prometheus/jmx_exporter
 
 * 另外还有如下自定义的 `metrics`
 
@@ -65,7 +67,7 @@ description: monitor插件
 
 用户需部署`Prometheus` 服务来采集
 
-* 选择对应环境的[下载地址](https://prometheus.io/download/)安装
+* 选择对应环境的 [下载地址](https://prometheus.io/download/)安装
 * 修改配置文件:`prometheus.yml`
 
  ```yaml
diff --git a/content/zh/projects/shenyu/shenyu-optimize/index.md b/content/zh/projects/shenyu/shenyu-optimize/index.md
index 764e97a..3d16381 100644
--- a/content/zh/projects/shenyu/shenyu-optimize/index.md
+++ b/content/zh/projects/shenyu/shenyu-optimize/index.md
@@ -6,18 +6,18 @@ description: ShenYu 性能优化
 
 ## 说明
 
-* 本文主要介绍如何对 ShenYu 进行优化
+* 本文主要介绍如何对 `ShenYu` 进行优化。
 
 
 ## 本身消耗
 
-* ShenYu 本身所有的操作,都是基于 jvm 内存来匹配,本身消耗时间大概在 1-3ms 左右。
+* `ShenYu`本身所有的操作,都是基于 `JVM` 内存来匹配,本身消耗时间大概在 `1-3ms` 左右。
 
-## 底层netty调优
+## 底层Netty调优
 
-* ShenYu内置依赖 `spring-webflux` 而其底层是使用的 netty
+* `ShenYu`内置依赖 `spring-webflux` 而其底层是使用的 `netty` 。
 
-* 我们可以自定义 netty 的相关参数来对 ShenYu 进行优化,以下是示例:
+* 我们可以自定义 `netty` 的相关参数来对 `ShenYu` 进行优化,以下是示例:
 
 ```java
    @Bean
@@ -42,9 +42,9 @@ description: ShenYu 性能优化
     }
 ```
 
-* 这个类在 shenyu-bootstrap 中已经内置,在压测的时候,可以根据自己的需求来进行优化设置。
+* 这个类在 `shenyu-bootstrap` 中已经内置,在压测的时候,可以根据自己的需求来进行优化设置。
 
-* 业务线程模型可以看[线程模型](../thread)
+* 业务线程模型,请参考:[线程模型](../thread) 。
 
 
 
diff --git a/content/zh/projects/shenyu/spi-design/index.md b/content/zh/projects/shenyu/spi-design/index.md
index 25f52a6..8416697 100644
--- a/content/zh/projects/shenyu/spi-design/index.md
+++ b/content/zh/projects/shenyu/spi-design/index.md
@@ -4,4 +4,39 @@ keywords: ShenYu
 description:  对ShenYu网关中SPI的使用进行介绍
 ---
 
-to do.
+`SPI` 全称为 `Service Provider Interface`, 是 `JDK` 内置的一种服务提供发现功能, 一种动态替换发现的机制。
+
+[shenyu-spi](../https://github.com/apache/incubator-shenyu/tree/master/shenyu-spi) 是`ShenYu`网关自定义的`SPI`扩展实现,设计和实现原理参考了`Dubbo`的 [SPI扩展实现](../https://dubbo.apache.org/zh/docs/v2.7/dev/impls/) 。
+ 
+ 
+### 注册中心扩展
+
+通过哪种方式实现服务的注册,当前支持`Consul`、`Etcd`、`Http`、`Nacos`和`Zookeeper`。注册中心的扩展包括客户端和服务端,接口分别为 `ShenyuServerRegisterRepository` 和 `ShenyuClientRegisterRepository` 。
+
+### 监控中心扩展
+
+负责服务的监控,通过`SPI`加载具体实现,当前支持`Prometheus` ,服务接口是 `MetricsBootService` 。
+
+### 负载均衡扩展
+
+从多个服务提供方中选择一个进行调用,当前支持的算法有`Hash`、`Random` 和 `RoundRobin`,扩展接口是 `LoadBalance` 。
+
+
+### RateLimiter扩展
+
+在`RateLimiter`插件中,使用何种限流算法,当前支持`Concurrent`、`LeakyBucket`、`SlidingWindow` 和 `TokenBucket`,扩展接口是 `RateLimiterAlgorithm` 。
+
+
+### 匹配方式扩展
+
+在添加选择器和规则时,使用哪种匹配方式,当前支持`And`、`Or`,扩展接口是 `MatchStrategy` 。
+
+
+### 条件参数扩展
+
+在添加选择器和规则时,使用哪种条件参数,当前支持`URI`、`RequestMethod`、`Query`、`Post`、`IP`、`Host`、`Cookie` 和 `Header`,扩展接口是 `ParameterData` 。
+
+
+### 条件策略扩展
+
+在添加选择器和规则时,使用哪种条件策略,当前支持`Match`、`Contains`、`Equals`、`Groovy`、`Regex`、`SpEL`、`TimerAfter` 和 `TimerBefore`,扩展接口是 `PredicateJudge` 。
diff --git a/content/zh/projects/shenyu/thread/index.md b/content/zh/projects/shenyu/thread/index.md
index aac5a82..3cd2850 100644
--- a/content/zh/projects/shenyu/thread/index.md
+++ b/content/zh/projects/shenyu/thread/index.md
@@ -6,22 +6,22 @@ description: 线程模型
 
 ## 说明
 
-* 本文主要介绍 ShenYu 的线程模型,以及各种场景的使用。
+* 本文主要介绍 `ShenYu` 的线程模型,以及各种场景的使用。
 
-## io与work线程
+## IO与Work线程
 
-* ShenYu 内置依赖 `spring-webflux` 而其底层是使用的 netty,这一块主要是使用的 netty 线程模型。
+* `ShenYu` 内置依赖 `spring-webflux`, 而其底层是使用的是 `netty`,这一块主要是使用的 `netty` 线程模型。
 
 ## 业务线程
 
 * 默认使用调度线程来执行。
-* 默认使用固定的线程池来执行,其线程数为 cpu * 2 + 1。
+* 默认使用固定的线程池来执行,其线程数为 `cpu * 2 + 1`。
 
 ## 切换类型
 
 * `reactor.core.scheduler.Schedulers`。
 * 可以使用 `-Dshenyu.scheduler.type=fixed` 这个是默认。 设置其他的值 就会使用弹性线程池来执行`Schedulers.elastic()`。
-* 可以使用 `-Dshenyu.work.threads = xx` 来指定线程数量,默认为 `cpu * 2 + 1`,最小为16个线程。
+* 可以使用 `-Dshenyu.work.threads = xx` 来指定线程数量,默认为 `cpu * 2 + 1`,最小为`16`个线程。
 
 
 
diff --git a/static/img/shenyu/plugin/logging/logging-1.png b/static/img/shenyu/plugin/logging/logging-1.png
new file mode 100644
index 0000000..ff26ce3
Binary files /dev/null and b/static/img/shenyu/plugin/logging/logging-1.png differ
diff --git a/static/img/shenyu/plugin/monitor/monitor-1.png b/static/img/shenyu/plugin/monitor/monitor-1.png
new file mode 100644
index 0000000..ae9fdd9
Binary files /dev/null and b/static/img/shenyu/plugin/monitor/monitor-1.png differ