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/08/01 02:31:27 UTC
[incubator-shenyu-website] branch main updated: Update english
document for Fault Tolerance (#170)
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 152138e Update english document for Fault Tolerance (#170)
152138e is described below
commit 152138e5be0e83d65a8d6c0ff58cfa29f55889f0
Author: midnight2104 <33...@qq.com>
AuthorDate: Sun Aug 1 10:31:20 2021 +0800
Update english document for Fault Tolerance (#170)
---
content/en/projects/shenyu/_index.md | 4 +-
.../projects/shenyu/custom-sign-algorithm/index.md | 6 +-
content/en/projects/shenyu/hystrix-plugin/index.md | 67 +++++++++++++----
content/en/projects/shenyu/jwt-plugin/index.md | 8 +-
content/en/projects/shenyu/logging-plugin/index.md | 8 +-
content/en/projects/shenyu/monitor-plugin/index.md | 8 +-
content/en/projects/shenyu/oauth2-plugin/index.md | 6 +-
.../projects/shenyu/rate-limiter-plugin/index.md | 44 ++++++-----
.../projects/shenyu/resilience4j-plugin/index.md | 83 +++++++++++++--------
.../en/projects/shenyu/sentinel-plugin/index.md | 82 ++++++++++++++------
content/en/projects/shenyu/sign-plugin/index.md | 8 +-
content/en/projects/shenyu/spi-design/index.md | 46 +++++++++++-
content/en/projects/shenyu/waf-plugin/index.md | 8 +-
content/zh/projects/shenyu/hystrix-plugin/index.md | 7 +-
content/zh/projects/shenyu/jwt-plugin/index.md | 2 +-
content/zh/projects/shenyu/oauth2-plugin/index.md | 4 +-
.../projects/shenyu/rate-limiter-plugin/index.md | 12 +--
.../projects/shenyu/resilience4j-plugin/index.md | 28 +++----
content/zh/projects/shenyu/sign-plugin/index.md | 4 +-
content/zh/projects/shenyu/waf-plugin/index.md | 2 +-
.../shenyu/plugin/hystrix/hystrix-plugin-en-1.png | Bin 0 -> 94916 bytes
.../shenyu/plugin/hystrix/hystrix-plugin-en-2.png | Bin 0 -> 78692 bytes
.../shenyu/plugin/hystrix/hystrix-plugin-en-3.png | Bin 0 -> 118577 bytes
.../plugin/ratelimiter/ratelimiter-plugin-en-1.png | Bin 0 -> 99841 bytes
.../resilience4j/resilience4j-plugin-en-1.png | Bin 0 -> 90348 bytes
.../resilience4j/resilience4j-plugin-en-2.png | Bin 0 -> 77670 bytes
.../resilience4j/resilience4j-plugin-en-3.png | Bin 0 -> 118432 bytes
.../plugin/sentinel/sentinel-plugin-en-1.png | Bin 0 -> 89764 bytes
.../plugin/sentinel/sentinel-plugin-en-2.png | Bin 0 -> 77560 bytes
.../plugin/sentinel/sentinel-plugin-en-3.png | Bin 0 -> 123659 bytes
30 files changed, 290 insertions(+), 147 deletions(-)
diff --git a/content/en/projects/shenyu/_index.md b/content/en/projects/shenyu/_index.md
index 506884f..5818484 100644
--- a/content/en/projects/shenyu/_index.md
+++ b/content/en/projects/shenyu/_index.md
@@ -42,6 +42,8 @@ sidebar:
link: 'register-center-design'
- title: 'Flow Control'
link: 'flow-control'
+ - title: 'SPI Design'
+ link: 'spi-design'
- title: 'Deployment'
sub:
- title: 'Local Deployment'
@@ -181,8 +183,6 @@ sidebar:
link: 'thread'
- title: 'Shenyu Optimize'
link: 'shenyu-optimize'
- - title: 'SPI'
- link: 'spi-design'
- title: 'Release Notes'
link: 'release-notes'
- title: 'Download'
diff --git a/content/en/projects/shenyu/custom-sign-algorithm/index.md b/content/en/projects/shenyu/custom-sign-algorithm/index.md
index 16277f6..e49222f 100644
--- a/content/en/projects/shenyu/custom-sign-algorithm/index.md
+++ b/content/en/projects/shenyu/custom-sign-algorithm/index.md
@@ -12,7 +12,7 @@ description: specify sign plugins for examination
## Extension
* The default implementation is `org.apache.shenyu.plugin.sign.service.DefaultSignService`.
-* Declare a new class named "A" and implements `org.apache.shenyu.plugin.api.SignService`.
+* Declare a new class named `CustomSignService` and implements `org.apache.shenyu.plugin.api.SignService`.
```java
public interface SignService {
@@ -33,8 +33,8 @@ description: specify sign plugins for examination
```java
@Bean
- public SignService a() {
- return new A
+ public SignService customSignService() {
+ return new CustomSignService();
}
```
diff --git a/content/en/projects/shenyu/hystrix-plugin/index.md b/content/en/projects/shenyu/hystrix-plugin/index.md
index 714f36f..8270b52 100644
--- a/content/en/projects/shenyu/hystrix-plugin/index.md
+++ b/content/en/projects/shenyu/hystrix-plugin/index.md
@@ -4,33 +4,57 @@ keywords: Apache ShenYu
description: hystrix plugin
---
-## Explanation
+## Description
* Hystrix plugin is the core implementation used by gateway to fuse traffic.
-* Use semaphores to process requests.
+* Support `thread` and `semaphore` .
## Plugin Setting
-* In `shenyu-admin` --> plugin management --> `hystrix`, set to enable.
+Select a mode to start shenyu-admin. For details, see deployment. For example, with [Local Deployment](../deployment-local) starts the `Apache ShenYu` background management system.
+
+* In BasicConfig --> Plugin --> hystrix, set to enable.
* If the user don't use, please disable the plugin in the background.
-## Plugin Instruction
+<img src="/img/shenyu/plugin/hystrix/hystrix-plugin-en-1.png" width="80%" height="80%" />
+
+
+## Add hystrix plugin dependency
-* Introduce `hystrix` dependency in the pom.xml file of the gateway.
+* Add `hystrix` dependency in the `pom.xml` file of the gateway.
```xml
- <!-- apache shenyu hystrix plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-hystrix</artifactId>
- <version>${last.version}</version>
- </dependency>
- <!-- apache shenyu hystrix plugin end-->
+ <!-- apache shenyu hystrix plugin start-->
+ <dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-hystrix</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- apache shenyu hystrix plugin end-->
```
-* Selectors and rules, please refer to: [selector](../selector-and-rule).
-* Hystrix processing details:
+
+## Hystrix Config
+
+
+For more information on selectors and rules configuration, see [Selector And Rule Config](../selector-and-rule) , only some of the fields are covered here.
+
+#### Selector Config
+
+It is used to filter traffic for the first time and does not require handle fields.
+
+<img src="/img/shenyu/plugin/hystrix/hystrix-plugin-en-2.png" width="80%" height="80%" />
+
+#### Rule Config
+
+For the final filtering of traffic, there is a rule handler logic, isolation mode supports `thread` and `semaphore`.
+
+<img src="/img/shenyu/plugin/hystrix/hystrix-plugin-en-3.png" width="80%" height="80%" />
+
+
+
+* Hystrix handler details:
* Trip minimum request quantity: the minimum request quantity, which must be reached at least before the fuse is triggered
* Error half-score threshold: the percentage of exceptions in this period of time.
@@ -39,3 +63,18 @@ description: hystrix plugin
* Grouping Key: generally set as: contextPath
* Command Key: generally set to specific path interface.
* CallBackUrl: default url: /fallback/hystrix.
+
+ * MinimumRequests: the minimum number of requests required to trigger a circuit breaker.
+
+ * ErrorThresholdPercentage: percentage of exception occurring during that time.
+
+ * MaxConcurrentRequests: max concurrent requests.
+
+ * Sleep`(ms)`: The recovery time after the circuit breaker.
+
+ * GroupKey: It is generally set to: `contextPath`.
+
+ * CallBackUrl: default url `/fallback/hystrix`.
+
+ * CommandKey: generally, it is set to a specific path interface.
+
diff --git a/content/en/projects/shenyu/jwt-plugin/index.md b/content/en/projects/shenyu/jwt-plugin/index.md
index fea4a77..b376555 100644
--- a/content/en/projects/shenyu/jwt-plugin/index.md
+++ b/content/en/projects/shenyu/jwt-plugin/index.md
@@ -4,13 +4,13 @@ keywords: Jwt
description: Jwt plugin
---
-## Explanation
+## Description
* The jwt plug-in is for the `token` attribute or `authorization` of the http request header to carry the attribute value for authentication judgment and judge OAuth2.0 .
## Plugin Setting
-Please refer to the `deployment` document, choose a way to start `shenyu-admin`. For example, through [local deployment](../deployment-local) to start the `Apache ShenYu` management system .
+Please refer to the `deployment` document, choose a way to start `shenyu-admin`. For example, through [Local Deployment](../deployment-local) to start the `Apache ShenYu` management system .
* In `shenyu-admin` BasicConfig --> plugin -> `jwt` set to enable.If you don't want to use this function, please disable this plugin in the `shenyu-admin`.
@@ -35,12 +35,12 @@ Please refer to the `deployment` document, choose a way to start `shenyu-admin`.
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-jwt</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu jwt plugin end-->
```
-* For more instructions on selector and rule configuration, please refer to: [Selector And Rule Configu](../selector-and-rule).
+* For more instructions on selector and rule configuration, please refer to: [Selector And Rule Config](../selector-and-rule).
## Situation
diff --git a/content/en/projects/shenyu/logging-plugin/index.md b/content/en/projects/shenyu/logging-plugin/index.md
index 87f0d62..4380c80 100644
--- a/content/en/projects/shenyu/logging-plugin/index.md
+++ b/content/en/projects/shenyu/logging-plugin/index.md
@@ -4,13 +4,13 @@ keywords: logging
description: logging plugin
---
-## Explanation
+## Description
* When making invokes to the target service, Apache ShenYu gateway also allows users to print the request information in the log that includes the request path, request method, request parameters, response header, response body ...etc.
## Plugin Setting
-* In `shenyu-admin` --> plugin management --> `logging`, set to enable.
+* In `shenyu-admin` --> BasicConfig --> Plugin --> `logging`, set to enable.
* Introduce `logging` support in the pox.xml file of the gateway.
* If the user don't use, please disable the plugin in the background.
@@ -19,12 +19,12 @@ description: logging plugin
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu logging plugin end-->
```
-* Selectors and rules, please refer to: [selector](../selector-and-rule)。
+* Selectors and rules, please refer to: [Selector And Rule Config](../selector-and-rule)。
* Only those matched requests can print the information about this request.
## Situation
diff --git a/content/en/projects/shenyu/monitor-plugin/index.md b/content/en/projects/shenyu/monitor-plugin/index.md
index 8674f82..46e3358 100644
--- a/content/en/projects/shenyu/monitor-plugin/index.md
+++ b/content/en/projects/shenyu/monitor-plugin/index.md
@@ -4,7 +4,7 @@ keywords: monitor
description: monitor plugin
---
-## Explanation
+## Description
* Monitor plugin is used to monitor its own running status(JVM-related) by gateway, include request response delay, QPS, TPS, and other related metrics.
@@ -18,7 +18,7 @@ description: monitor plugin
## Plugin Setting
-* In `shenyu-admin`--> plugin management-> monitor, set to enable.
+* In `shenyu-admin`--> BasicConfig --> Plugin --> monitor, set to enable.
* Add the following configuration in the monitor plugin.
```yaml
@@ -37,11 +37,11 @@ description: monitor plugin
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-monitor</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu monitor plugin end-->
```
-* Selectors and rules, please refer to: [selector](../selector-and-rule).
+* Selectors and rules, please refer to: [Selector And Rule Config](../selector-and-rule).
* Only when the url is matched, the url will request event tracking.
## Metrics Detail
diff --git a/content/en/projects/shenyu/oauth2-plugin/index.md b/content/en/projects/shenyu/oauth2-plugin/index.md
index a6fef9e..1f7e421 100644
--- a/content/en/projects/shenyu/oauth2-plugin/index.md
+++ b/content/en/projects/shenyu/oauth2-plugin/index.md
@@ -4,13 +4,13 @@ keywords: OAuth2
description: OAuth2 plugin
---
-## Explanation
+## Description
* The OAuth2 plugin is implemented using Webflux OAuth2, used to support OAuth protocol.
## Plugin Setting
-Please refer to the `deployment` document, choose a way to start `shenyu-admin`. For example, [local deployment](../deployment-local).
+Please refer to the `deployment` document, choose a way to start `shenyu-admin`. For example, [Local Deployment](../deployment-local).
* In `shenyu-admin` BasicConfig --> plugin -> `oauth2` set to enable.If you don't want to use this function, please disable this plugin in the `shenyu-admin`.
@@ -27,7 +27,7 @@ Please refer to the `deployment` document, choose a way to start `shenyu-admin`.
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-oauth2</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu oauth2 plugin end-->
diff --git a/content/en/projects/shenyu/rate-limiter-plugin/index.md b/content/en/projects/shenyu/rate-limiter-plugin/index.md
index 66bca7b..53cd0a8 100644
--- a/content/en/projects/shenyu/rate-limiter-plugin/index.md
+++ b/content/en/projects/shenyu/rate-limiter-plugin/index.md
@@ -4,9 +4,9 @@ keywords: rateLimiter
description: rateLimiter plugin
---
-## Explanation
+## Description
-* rateLimiter is core implementation of gateway restrictions on network traffic.
+* RateLimiter is core implementation of gateway restrictions on network traffic.
* the Apache ShenYu gateway provides a variety of current limiting algorithms, including `token bucket algorithm`, `concurrent token bucket algorithm`, `leaky bucket algorithm` and `sliding time window algorithm`.
@@ -45,7 +45,7 @@ description: rateLimiter plugin
## Plugin Setting
-* In `shenyu-admin`--> plugin management--> `rate_limiter` set to enable.
+* In `shenyu-admin`--> BasicConfig --> Plugin --> `rate_limiter` set to enable.
* Configure redis in the plugin.
@@ -57,48 +57,54 @@ description: rateLimiter plugin
## Plugin Detail
-* Introduce `rateLimiter` dependency in pom.xml file of the gateway.
+* Add `rateLimiter` dependency in `pom.xml` file of the gateway.
```xml
<!-- apache shenyu ratelimiter plugin start-->
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-ratelimiter</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu ratelimiter plugin end-->
```
-* Selectors and rules, please refer to: [selector](../selector-and-rule)。
+For more information on selectors and rules configuration, see [Selector And Rule Config](../selector-and-rule) , only some of the fields are covered here.
-* Detailed description of the rules
-* * Token bucket algorithm/Concurrent token bucket algorithm
-lgorithmName:tocketBucket/concurrent
+* Rules Handler Details
-replenishRate:It is how many requests you allow users to execute per second, while not discarding any requests. This is the filling rate of token bucket.
+<img src="/img/shenyu/plugin/ratelimiter/ratelimiter-plugin-en-1.png" width="80%" height="80%" />
-burstCapacity:it is the maximum number of requests that users are allowed to execute in one second. This is token bucket can save the number of token.
+* TocketBucket/Concurrent
-* * Leaky bucket algorithm
+ * `algorithmName`: tocketBucket/concurrent.
+ * `replenishRate`: It is how many requests you allow users to execute per second, while not discarding any requests. This is the filling rate of token bucket.
-algorithmName:leakyBucket
+ * `burstCapacity`: it is the maximum number of requests that users are allowed to execute in one second. This is token bucket can save the number of token.
-replenishRate:The rate at which requests are executed per unit time, and the rate at which water droplets leak out of the leaky bucket.
+ * `keyResolverName`: `whole` indicates that the traffic is limited by gateway per second, and `remoteAddress` indicates that the traffic is limited by IP per second.
-burstCapacity:The maximum number of requests that users are allowed to execute in one second. This is the amount of water in the bucket.
+* LeakyBucket
+ * `algorithmName`: leakyBucket.
-* * Sliding time window algorithm
+ * `replenishRate`: The rate at which requests are executed per unit time, and the rate at which water droplets leak out of the leaky bucket.
+ * `burstCapacity`: The maximum number of requests that users are allowed to execute in one second. This is the amount of water in the bucket.
-algorithmName:sildingWindow
+ * `keyResolverName`: `whole` indicates that the traffic is limited by gateway per second, and `remoteAddress` indicates that the traffic is limited by IP per second.
-replenishRate:The rate of requests per unit time, used to calculate the size of the time window.
+* SildingWindow
-burstCapacity:The maximum number of requests in the time window (per unit time).
+ * `algorithmName`: sildingWindow.
+ * `replenishRate`: The rate of requests per unit time, used to calculate the size of the time window.
+
+ * `burstCapacity`: The maximum number of requests in the time window (per unit time).
+
+ * `keyResolverName`: `whole` indicates that the traffic is limited by gateway per second, and `remoteAddress` indicates that the traffic is limited by IP per second.
diff --git a/content/en/projects/shenyu/resilience4j-plugin/index.md b/content/en/projects/shenyu/resilience4j-plugin/index.md
index afa45e3..f27cfc0 100644
--- a/content/en/projects/shenyu/resilience4j-plugin/index.md
+++ b/content/en/projects/shenyu/resilience4j-plugin/index.md
@@ -4,57 +4,78 @@ keywords: Apache ShenYu
description: resilience4j plugin
---
-## Explanation
+## Description
* Resilience4j is one of the options that supports flow control and circuit breaking.
* Resilience4j supports flow control and circuit breaking functions for gateway.
## Plugin Setting
-* In `shenyu-admin` --> plugin management --> `resilience4j` set to enable.
-* If you don't want to use it, please close the plugin in `shenyu-admin`.
+Select a mode to start shenyu-admin. For details, see deployment. For example, with [Local Deployment](../deployment-local) starts the `Apache ShenYu` background management system.
-## Plugin Usage
+* In BasicConfig --> Plugin --> resilience4j, set to enable.
+* If the user don't use, please disable the plugin in the background.
-* Introducing the follow supports to the pom.xml file of Apache ShenYu project.
+<img src="/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-1.png" width="80%" height="80%" />
+
+
+
+## Add resilience4j plugin dependency
+
+* Add `resilience4j` dependency in the `pom.xml` file of the gateway.
```xml
- <!-- apache shenyu resilience4j plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-resilience4j</artifactId>
- <version>${last.version}</version>
- </dependency>
- <!-- apache shenyu resilience4j plugin end-->
+ <!-- apache shenyu resilience4j plugin start-->
+ <dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-resilience4j</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- apache shenyu resilience4j plugin end-->
```
-* Selectors and rules, please refer to: [selector](../selector-and-rule)
+## Resilience4j Config
+
+For more information on selectors and rules configuration, see [Selector And Rule Config](../selector-and-rule) , only some of the fields are covered here.
+
+#### Selector Config
+
+It is used to filter traffic for the first time and does not require handle fields.
+
+
+<img src="/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-2.png" width="80%" height="80%" />
+
+#### Rule Config
+
+For the final filtering of traffic, there is a rule handler logic.
+
+<img src="/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-3.png" width="80%" height="80%" />
* Resilience4j Processing Details
- * timeoutDurationRate :Configures wait time(ms) a thread waits for a permission,default value:5000。
-
- * limitRefreshPeriod :Configures the period of a limit refresh. After each period the rate limiter sets its permissions count back to the limitForPeriod value,default value:500。
-
- * limitForPeriod :Configures the number of permissions available during one limit refresh period,default value:50。
-
- * circuitEnable :Configures circuitBreaker enable,0:OFF,1:ON ,default value:0。
+ * limitForPeriod :Configures the number of permissions available during one limit refresh period,default value:50.
+
+ * limitRefreshPeriod :Configures the period of a limit refresh. After each period the rate limiter sets its permissions count back to the limitForPeriod value,default value:500.
+
+ * timeoutDurationRate :Configures wait time(ms) a thread waits for a permission,default value:5000.
- * timeoutDuration :Configures request CircuitBreaker timeout(ms),default value:30000。
+ * circuitEnable :Configures circuitBreaker enable,0:OFF,1:ON ,default value:0.
- * fallbackUri :Configures the fall back uri。
+ * failureRateThreshold :Configures the failure rate threshold in percentage,When the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls,default value:50.
+
+ * fallbackUri :Configures the fall back uri.
+
+ * minimumNumberOfCalls :Configures the minimum number of calls which are required (per sliding window period) before the CircuitBreaker can calculate the error rate or slow call rate,default value:100.
+
+ * bufferSizeInHalfOpen:Configures the number of permitted calls when the CircuitBreaker is half open,default value:10.
- * slidingWindowSize :Configures the size of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed,default value:100。
+ * slidingWindowSize :Configures the size of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed,default value:100.
* slidingWindowType :Configures the type of the sliding window which is used to record the outcome of calls when the CircuitBreaker is closed,
- Sliding window can either be 0:count-based or 1:time-based.,default value:0。
+ Sliding window can either be 0:count-based or 1:time-based.,default value:0.
- * minimumNumberOfCalls :Configures the minimum number of calls which are required (per sliding window period) before the CircuitBreaker can calculate the error rate or slow call rate,default value:100。
-
- * waitIntervalFunctionInOpenState :Configures the circuitBreaker time(ms) of duration,default value:10。
-
- * permittedNumberOfCallsInHalfOpenState :Configures the number of permitted calls when the CircuitBreaker is half open,default value:10。
+ * timeoutDuration :Configures request CircuitBreaker timeout(ms),default value:30000.
- * failureRateThreshold :Configures the failure rate threshold in percentage,When the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls,default value:50。
+ * waitIntervalInOpen :Configures the circuitBreaker time(ms) of duration,default value:10.
- * automaticTransitionFromOpenToHalfOpenEnabled :Configures automatically transition from open state to half open state,true:ON,false:OFF,default value:false。
+ * automaticTransitionFromOpenToHalfOpenEnabled :Configures automatically transition from open state to half open state,true:ON,false:OFF,default value:false.
diff --git a/content/en/projects/shenyu/sentinel-plugin/index.md b/content/en/projects/shenyu/sentinel-plugin/index.md
index 87e99cd..7657e00 100644
--- a/content/en/projects/shenyu/sentinel-plugin/index.md
+++ b/content/en/projects/shenyu/sentinel-plugin/index.md
@@ -4,7 +4,8 @@ keywords: Apache ShenYu
description: sentinel plugin
---
-## Explanation
+
+## Description
* Sentinel is one of the options that supports flow control and circuit breaking.
* Sentinel supports flow control and circuit breaking functions for gateway.
@@ -12,39 +13,72 @@ description: sentinel plugin
## Plugin Setting
-* In `shenyu-admin` --> plugin management --> `sentinel` set to enable.
-* If you don't want to use it, please close the plugin in `shenyu-admin`.
+Select a mode to start shenyu-admin. For details, see deployment. For example, with [Local Deployment](../deployment-local) starts the `Apache ShenYu` background management system.
+
+* In BasicConfig --> Plugin --> sentinel, set to enable.
+* If the user don't use, please disable the plugin in the background.
+
+<img src="/img/shenyu/plugin/sentinel/sentinel-plugin-en-1.png" width="80%" height="80%" />
-## Plugin Usage
-* Introducing the follow supports to the pom.xml file of Apache ShenYu project.
+## Add sentinel plugin dependency
+
+* Add `sentinel` dependency in the `pom.xml` file of the gateway.
```xml
- <!-- apache shenyu sentinel plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-sentinel</artifactId>
- <version>${last.version}</version>
- </dependency>
- <!-- apache shenyu sentinel plugin end-->
+ <!-- apache shenyu sentinel plugin start-->
+ <dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-sentinel</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- apache shenyu sentinel plugin end-->
```
-* Selectors and rules, please refer to: [selector](../selector-and-rule)
-* Sentinel Processing Details
+
+## Sentinel Config
+
+For more information on selectors and rules configuration, see [Selector And Rule Config](../selector-and-rule) , only some of the fields are covered here.
+
+#### Selector Config
+
+It is used to filter traffic for the first time and does not require `handle` fields.
+
+
+<img src="/img/shenyu/plugin/sentinel/sentinel-plugin-en-2.png" width="80%" height="80%" />
+
+#### Rule Config
+
+For the final filtering of traffic, there is a rule handler logic.
+
+
+<img src="/img/shenyu/plugin/sentinel/sentinel-plugin-en-3.png" width="80%" height="80%" />
+
+
+
+* sentinel handler details:
+
+ * `degradeRuleCount`: threshold.
- * `flowRuleEnable (1 or 0)`: whether enable sentinel flow control function.
+ * `degradeRuleEnable (1 or 0)`: whether enable circuit breaking function of `sentinel`.
+
+ * `degradeRuleGrade`: circuit breaker strategy, support RT of seconds level/ Error Ratio of seconds level/ Error Count of minutes level strategy.
+
+ * `degradeRuleMinRequestAmount`: circuit breaker min request amount.
+ * `degradeRuleSlowRatioThreshold`: slow ratio threshold of degrading.
+
+ * `getDegradeRuleStatIntervals`: status intervals of degrade.
+
+ * `degradeRuleTimeWindow`: time of degrading(unit: second).
+
* `flowRuleControlBehavior`: effect(reject directly/ queue/ slow start up), it do not support flow control by invocation relation.
+
+ * `flowRuleCount`: sentinel flow control count.
+ * `flowRuleEnable (1 or 0)`: whether enable sentinel flow control function.
+
* `flowRuleGrade`: type of current limit threshold(QPS or Thread Count)。
-
- * `degradeRuleEnable (1 or 0)`: whether enable circuit breaking function of `sentinel`.
-
- * `degradeRuleGrade`: circuit breaker strategy, support RT of seconds level/ Error Ratio of seconds level/ Error Count of minutes level strategy.
-
- * `degradeRuleCount`: threshold.
-
- * `degradeRuleTimeWindow`: time of degrading(unit: second).
-
+
* `fallbackUri`: degraded uri after circuit breaking.
diff --git a/content/en/projects/shenyu/sign-plugin/index.md b/content/en/projects/shenyu/sign-plugin/index.md
index da059c8..c81d462 100644
--- a/content/en/projects/shenyu/sign-plugin/index.md
+++ b/content/en/projects/shenyu/sign-plugin/index.md
@@ -4,13 +4,13 @@ keywords: sign
description: sign plugin
---
-## Explanation
+## Description
* Sign is a native plugin of Apache ShenYu Gateway and is used to process signature authentication of requests.
## Plugin Setting
-Please refer to the `deployment` document, choose a way to start `shenyu-admin`. For example, through [local deployment](../deployment-local) to start the `Apache ShenYu` management system.
+Please refer to the `deployment` document, choose a way to start `shenyu-admin`. For example, through [Local Deployment](../deployment-local) to start the `Apache ShenYu` management system.
* In `shenyu-admin` BasicConfig --> plugin -> `sign` set to enable. If you don't want to use this function, please disable this plugin in the `shenyu-admin`.
@@ -25,12 +25,12 @@ Please refer to the `deployment` document, choose a way to start `shenyu-admin`.
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-sign</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu sign plugin end-->
```
-* Selectors and rules, please refer to: [selector](../selector-and-rule).
+* Selectors and rules, please refer to: [Selector And Rule Config](../selector-and-rule).
* Only those matched requests can be authenticated by signature.
diff --git a/content/en/projects/shenyu/spi-design/index.md b/content/en/projects/shenyu/spi-design/index.md
index 80db57f..f35af91 100644
--- a/content/en/projects/shenyu/spi-design/index.md
+++ b/content/en/projects/shenyu/spi-design/index.md
@@ -1,7 +1,49 @@
---
-title: spi-design
+title: SPI Design
keywords: spi-design
description: spi-design
---
-to do.
+
+'SPI', called 'Service Provider Interface', is a built-in JDK Service that provides discovery function and a dynamic replacement discovery mechanism.
+
+
+[shenyu-spi](https://github.com/apache/incubator-shenyu/tree/master/shenyu-spi) 是`Apache ShenYu`网关自定义的`SPI`扩展实现,设计和实现原理参考了`Dubbo`的 [SPI扩展实现](https://dubbo.apache.org/zh/docs/v2.7/dev/impls/) 。
+
+
+### Registry Center
+
+`Consul`, `Etcd`, `Http`, `Nacos` and `Zookeeper` are supported. The expansion of the registry including client and server, interface respectively `ShenyuServerRegisterRepository` and `ShenyuClientRegisterRepository`.
+
+### Metrics Center
+
+Responsible for service monitoring, loading concrete implementation through `SPI`, currently support `Prometheus`, service interface is `MetricsBootService`.
+
+
+
+### Load Balance
+
+Select one of the service providers to call. Currently, the supported algorithms are `Has`, `Random`, and `RoundRobin`, and the extended interface is `LoadBalance`.
+
+### RateLimiter
+
+
+In the `RateLimiter` plugin, which stream limiting algorithm to use, currently supporting `Concurren`, `LeakyBucke`, `SlidingWindow` and `TokenBucket`, the extension interface is `RateLimiterAlgorithm`.
+
+
+### Match Strategy
+
+Which matching method to use when adding selectors And rules, currently supports `And`, `Or`, And the extension interface is `MatchStrategy`.
+
+
+### Parameter Data
+
+
+Currently, `URI`,`RequestMethod`, `Query`, `Post`, `IP`, `Host`, `Cookie`, and `Header` are supported. The extended interface is `ParameterData`.
+
+
+### Predicate Judge
+
+Which conditional policy to use when adding selectors and rules currently supports `Match`, `Contains`,`Equals`, `Groovy`, `Regex`, `SpEL`, `TimerAfter` and `TimerBefore`. The extension interface is `PredicateJudge`.
+
+
diff --git a/content/en/projects/shenyu/waf-plugin/index.md b/content/en/projects/shenyu/waf-plugin/index.md
index f4f8a20..12604bf 100644
--- a/content/en/projects/shenyu/waf-plugin/index.md
+++ b/content/en/projects/shenyu/waf-plugin/index.md
@@ -4,13 +4,13 @@ keywords: waf
description: waf plugin
---
-## Explanation
+## Description
* Waf is the core implementation of gateway to realize firewall function for network traffic.
## Plugin Setting
-Please refer to the `deployment` document, choose a way to start `shenyu-admin`. For example, through [local deployment](../deployment-local) to start the `Apache ShenYu` management system.
+Please refer to the `deployment` document, choose a way to start `shenyu-admin`. For example, through [Local Deployment](../deployment-local) to start the `Apache ShenYu` management system.
* In `shenyu-admin` BasicConfig --> plugin -> `waf` set to enable.If you don't want to use this function, please disable this plugin in the `shenyu-admin`.
@@ -33,14 +33,14 @@ Please refer to the `deployment` document, choose a way to start `shenyu-admin`.
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-waf</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu waf plugin end-->
```
## Waf Plugin Configuration
-For more instructions on selector and rule configuration, please refer to: [Selector And Rule Configu](../selector-and-rule), here only some fields are introduced.
+For more instructions on selector and rule configuration, please refer to: [Selector And Rule Config](../selector-and-rule), here only some fields are introduced.
`Waf` plugin rule configuration page:
diff --git a/content/zh/projects/shenyu/hystrix-plugin/index.md b/content/zh/projects/shenyu/hystrix-plugin/index.md
index ce51d00..d8a4f77 100644
--- a/content/zh/projects/shenyu/hystrix-plugin/index.md
+++ b/content/zh/projects/shenyu/hystrix-plugin/index.md
@@ -62,7 +62,8 @@ description: hystrix插件
* 跳闸休眠时间`(ms)`:熔断以后恢复的时间。
* 分组`Key`: 一般设置为:`contextPath` 。
+
+ * 失败降级`URL`: 默认为 `/fallback/hystrix`。
- * 命令`Key`: 一般设置为具体的路径接口。
-
- * 失败降级`URL`: 默认为 `/fallback/hystrix`。
+ * 命令`Key`: 一般设置为具体的路径接口。
+
diff --git a/content/zh/projects/shenyu/jwt-plugin/index.md b/content/zh/projects/shenyu/jwt-plugin/index.md
index 5d2d278..6e0284a 100644
--- a/content/zh/projects/shenyu/jwt-plugin/index.md
+++ b/content/zh/projects/shenyu/jwt-plugin/index.md
@@ -37,7 +37,7 @@ description: Jwt插件
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-jwt</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu jwt plugin end-->
diff --git a/content/zh/projects/shenyu/oauth2-plugin/index.md b/content/zh/projects/shenyu/oauth2-plugin/index.md
index 2160b81..23d69d4 100644
--- a/content/zh/projects/shenyu/oauth2-plugin/index.md
+++ b/content/zh/projects/shenyu/oauth2-plugin/index.md
@@ -4,7 +4,7 @@ keywords: OAuth 2
description: OAuth 2插件
---
-## **说明**
+## 说明
- OAuth2插件使用Webflux OAuth2实现,用于支持OAuth协议。
@@ -25,7 +25,7 @@ description: OAuth 2插件
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-oauth2</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu oauth2 plugin end-->
diff --git a/content/zh/projects/shenyu/rate-limiter-plugin/index.md b/content/zh/projects/shenyu/rate-limiter-plugin/index.md
index 6abfcd1..bc80aff 100644
--- a/content/zh/projects/shenyu/rate-limiter-plugin/index.md
+++ b/content/zh/projects/shenyu/rate-limiter-plugin/index.md
@@ -81,30 +81,30 @@ description: rateLimiter插件
* 令牌桶算法/并发令牌桶算法
- * `algorithmName`(算法名):tocketBucket/concurrent
+ * `algorithmName`(算法名):tocketBucket/concurrent 。
* `replenishRate`(速率):允许用户每秒执行多少请求,而丢弃任何请求。这是令牌桶的填充速率。
* `burstCapacity`(容量):允许用户在一秒钟内执行的最大请求数。这是令牌桶可以保存的令牌数。
- * `keyResolverName`(限流依据):`whole`表示按网关每秒限流,`remoteAddress`表示按IP每秒限流
+ * `keyResolverName`(限流依据):`whole`表示按网关每秒限流,`remoteAddress`表示按IP每秒限流。
* 漏桶算法
- * `algorithmName`(算法名):leakyBucket
+ * `algorithmName`(算法名):leakyBucket 。
* `replenishRate`(速率):单位时间内执行请求的速率,漏桶中水滴漏出的速率。
* `burstCapacity`(容量):允许用户在一秒钟内执行的最大请求数。这是桶中的水量。
- * `keyResolverName`(限流依据):`whole`表示按网关每秒限流,`remoteAddress`表示按IP每秒限流
+ * `keyResolverName`(限流依据):`whole`表示按网关每秒限流,`remoteAddress`表示按IP每秒限流。
* 滑动窗口算法
- * `algorithmName`(算法名):sildingWindow
+ * `algorithmName`(算法名):sildingWindow 。
* `replenishRate`(速率):单位时间内执行请求的速率,用于计算时间窗口大小。
* `burstCapacity`(容量):时间窗口内(单位时间内)最大的请求数量。
- * `keyResolverName`(限流依据):`whole`表示按网关每秒限流,`remoteAddress`表示按IP每秒限流
+ * `keyResolverName`(限流依据):`whole`表示按网关每秒限流,`remoteAddress`表示按IP每秒限流。
diff --git a/content/zh/projects/shenyu/resilience4j-plugin/index.md b/content/zh/projects/shenyu/resilience4j-plugin/index.md
index d7e4674..80cd5aa 100644
--- a/content/zh/projects/shenyu/resilience4j-plugin/index.md
+++ b/content/zh/projects/shenyu/resilience4j-plugin/index.md
@@ -33,7 +33,7 @@ description: resilience4j插件
<!-- apache shenyu resilience4j plugin end-->
```
-## resilience4j 插件配置
+## Resilience4j 插件配置
关于选择器和规则配置的更多说明,请参考:[选择器和规则管理](../selector-and-rule), 这里只对部分字段进行了介绍。
@@ -52,28 +52,28 @@ description: resilience4j插件
* `resilience4j`处理详解:
- * timeoutDurationRate:等待获取令牌的超时时间,单位ms,默认值:5000。
-
- * limitRefreshPeriod:刷新令牌的时间间隔,单位ms,默认值:500。
-
* limitForPeriod:每次刷新令牌的数量,默认值:50。
-
+
+ * limitRefreshPeriod:刷新令牌的时间间隔,单位ms,默认值:500。
+
+ * timeoutDurationRate:等待获取令牌的超时时间,单位ms,默认值:5000。
+
* circuitEnable:是否开启熔断,0:关闭,1:开启,默认值:0。
- * timeoutDuration:熔断超时时间,单位ms,默认值:30000。
-
+ * failureRateThreshold:错误率百分比,达到这个阈值,熔断器才会开启,默认值50。
+
* fallbackUri:降级处理的uri。
+
+ * minimumNumberOfCalls:开启熔断的最小请求数,超过这个请求数才开启熔断统计,默认值:100。
+
+ * bufferSizeInHalfOpen:半开状态下的环形缓冲区大小,必须达到此数量才会计算失败率,默认值:10。
* slidingWindowSize:滑动窗口大小,默认值:100。
* slidingWindowType:滑动窗口类型,0:基于计数,1:基于时间,默认值:0。
-
- * minimumNumberOfCalls:开启熔断的最小请求数,超过这个请求数才开启熔断统计,默认值:100。
- * waitIntervalInOpen:熔断器开启持续时间,单位ms,默认值:60000。
-
- * bufferSizeInHalfOpen:半开状态下的环形缓冲区大小,必须达到此数量才会计算失败率,默认值:10。
+ * timeoutDuration:熔断超时时间,单位ms,默认值:30000。
- * failureRateThreshold:错误率百分比,达到这个阈值,熔断器才会开启,默认值50。
+ * waitIntervalInOpen:熔断器开启持续时间,单位ms,默认值:60000。
* automaticTransitionFromOpenToHalfOpenEnabled:是否自动从open状态转换为half-open状态,,true:是,false:否,默认值:false。
diff --git a/content/zh/projects/shenyu/sign-plugin/index.md b/content/zh/projects/shenyu/sign-plugin/index.md
index c848cdb..62d530a 100644
--- a/content/zh/projects/shenyu/sign-plugin/index.md
+++ b/content/zh/projects/shenyu/sign-plugin/index.md
@@ -26,12 +26,12 @@ description: sign插件
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-sign</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- apache shenyu sign plugin end-->
```
-* 选择器和规则,请详细看:[选择器规则](../selector-and-rule)。
+* 选择器和规则,请详细看:[选择器和规则管理](../selector-and-rule) 。
* 只有匹配的请求,才会进行签名认证。
diff --git a/content/zh/projects/shenyu/waf-plugin/index.md b/content/zh/projects/shenyu/waf-plugin/index.md
index 8f25bc8..edce95c 100644
--- a/content/zh/projects/shenyu/waf-plugin/index.md
+++ b/content/zh/projects/shenyu/waf-plugin/index.md
@@ -33,7 +33,7 @@ description: waf插件
<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-waf</artifactId>
- <version>${last.version}</version>
+ <version>${project.version}</version>
</dependency>
<!-- Apache ShenYu waf plugin end-->
```
diff --git a/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-1.png b/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-1.png
new file mode 100644
index 0000000..94b7fe6
Binary files /dev/null and b/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-1.png differ
diff --git a/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-2.png b/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-2.png
new file mode 100644
index 0000000..3292599
Binary files /dev/null and b/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-2.png differ
diff --git a/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-3.png b/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-3.png
new file mode 100644
index 0000000..7793458
Binary files /dev/null and b/static/img/shenyu/plugin/hystrix/hystrix-plugin-en-3.png differ
diff --git a/static/img/shenyu/plugin/ratelimiter/ratelimiter-plugin-en-1.png b/static/img/shenyu/plugin/ratelimiter/ratelimiter-plugin-en-1.png
new file mode 100644
index 0000000..971f3bc
Binary files /dev/null and b/static/img/shenyu/plugin/ratelimiter/ratelimiter-plugin-en-1.png differ
diff --git a/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-1.png b/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-1.png
new file mode 100644
index 0000000..5d6152d
Binary files /dev/null and b/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-1.png differ
diff --git a/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-2.png b/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-2.png
new file mode 100644
index 0000000..2fd7d29
Binary files /dev/null and b/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-2.png differ
diff --git a/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-3.png b/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-3.png
new file mode 100644
index 0000000..d6c2557
Binary files /dev/null and b/static/img/shenyu/plugin/resilience4j/resilience4j-plugin-en-3.png differ
diff --git a/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-1.png b/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-1.png
new file mode 100644
index 0000000..cf2f55b
Binary files /dev/null and b/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-1.png differ
diff --git a/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-2.png b/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-2.png
new file mode 100644
index 0000000..665d509
Binary files /dev/null and b/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-2.png differ
diff --git a/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-3.png b/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-3.png
new file mode 100644
index 0000000..d3d63c2
Binary files /dev/null and b/static/img/shenyu/plugin/sentinel/sentinel-plugin-en-3.png differ