Skip to content

Commit

Permalink
Fix broken links (#2863)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ committed Nov 14, 2023
1 parent 3a5e231 commit da40888
Show file tree
Hide file tree
Showing 65 changed files with 3,167 additions and 61 deletions.
2 changes: 1 addition & 1 deletion content/en/docs/v2.7/user/configuration/annotation.md
Expand Up @@ -7,7 +7,7 @@ description: "Configure Dubbo with annotation"
---

{{% pageinfo %}}
Requires`2.6.3` or higher, click here to view the [complete sample](https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-annotation)
Requires`2.6.3` or higher, click here to view the [complete sample](https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-annotation)
{{% /pageinfo %}}


Expand Down
Expand Up @@ -92,7 +92,7 @@ Next, let's look at the changes corresponding to `ServiceConfig, ReferenceConfig

- XML

Refer to [the sample](https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-spring-xml)
Refer to [the sample](https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-spring-xml)

```xml
<!-- dubbo-provier.xml -->
Expand All @@ -112,7 +112,7 @@ Refer to [the sample](https://github.com/apache/dubbo-samples/tree/master/1-basi

- Annotation

Refer to [the sample](https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-annotation)
Refer to [the sample](https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-annotation)

```java
// AnnotationService implementation
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs3-v2/java-sdk/reference-manual/config/xml.md
Expand Up @@ -9,7 +9,7 @@ description: "Develop Dubbo application with Spring XML"
Dubbo has custom configuration components based on Spring Schema extensions, and the configuration capabilities that can be achieved using XML are generally equivalent to [Configuration Reference Manual](../properties).


For complete examples of the following content, please refer to [dubbo-samples](https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-spring-xml)
For complete examples of the following content, please refer to [dubbo-samples](https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-spring-xml)

## service provider

Expand Down Expand Up @@ -112,4 +112,4 @@ public class BasicConsumer {
System.out.println(hello);
}
}
```
```
2 changes: 1 addition & 1 deletion content/zh-cn/blog/integration/dubbo-graalvm-support.md
Expand Up @@ -139,7 +139,7 @@ Dubbo AOT 做的事情与 Spring AOT 非常类似,只不过 Dubbo AOT 是专

接下来,我们通过一个 Spring6 + Dubbo3 的示例微服务应用,演示如何使用 Spring AOT、Dubbo AOT 等,来实现应用的 Native Image 打包。

完整的代码示例可在这里下载:[dubbo-samples-native-image](https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-native-image)
完整的代码示例可在这里下载:[dubbo-samples-native-image](https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-native-image-registry)

### 第一步:安装GraalVM

Expand Down
2 changes: 1 addition & 1 deletion content/zh-cn/blog/java/demos/dubbo-annotation.md
Expand Up @@ -175,7 +175,7 @@ public @interface Reference {

## 示例实战

了解了 `@EnableDubbo``@Service``@Reference` 的作用,下面以一个实际的例子来展示如何使用 annotation 来开发 Dubbo 应用。以下的代码可以在 https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-annotation 中找到。
了解了 `@EnableDubbo``@Service``@Reference` 的作用,下面以一个实际的例子来展示如何使用 annotation 来开发 Dubbo 应用。以下的代码可以在 https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-annotation 中找到。

### 1. 接口定义

Expand Down
2 changes: 1 addition & 1 deletion content/zh-cn/blog/news/ospp-2023-announcement.md
Expand Up @@ -58,7 +58,7 @@ Apache Dubbo 是国内最具影响力的开源软件项目之一,由阿里巴

1. 扫码关注回复 "Apache Dubbo" 官网微信公众号,回复 “编程之夏” 加入微信沟通群

![qrcode_for_gh_a84d4cf4c871_258 (1).jpg](https://intranetproxy.alipay.com/skylark/lark/0/2023/jpeg/54037/1684119089728-eae2eb7d-4098-430e-a69e-a3939265e22b.jpeg#clientId=ub09992a8-5524-4&from=paste&height=129&id=u938740a9&originHeight=258&originWidth=258&originalType=binary&ratio=2&rotation=0&showTitle=false&size=27895&status=done&style=none&taskId=ud0f6af1b-fed8-4a07-aa5a-4e3f3bce229&title=&width=129)
![qrcode_for_gh_a84d4cf4c871_258 (1).jpg](/imgs/blog/news/ospp-2023-announcement/1684119089728-eae2eb7d-4098-430e-a69e-a3939265e22b.jpeg)

2. 钉钉群:22895027434(Dubbo 2023 编程之夏群),搜索并加入咨询问题
3. 发送邮件到 Apache Dubbo 邮件组:dev@dubbo.apache.org
Expand Down
34 changes: 17 additions & 17 deletions content/zh-cn/blog/proposals/heuristic-flow-control.md
Expand Up @@ -26,9 +26,9 @@ description: >
#### 总体效果
对于负载均衡部分的有效性实验在两个不同的情况下进行的,分别是提供端机器配置比较均衡和提供端机器配置差距较大的情况。

![image.png](https://intranetproxy.alipay.com/skylark/lark/0/2023/png/67956773/1675265258687-c3df68a8-80e0-4311-816c-63480494850c.png#clientId=u54f9e7eb-38a1-4&from=paste&height=226&id=ud2d81be9&name=image.png&originHeight=890&originWidth=1798&originalType=binary&ratio=1&rotation=0&showTitle=false&size=63793&status=done&style=none&taskId=u9adb8df7-315a-4800-ac9f-888ba0d1c11&title=&width=457)
![image.png](/imgs/blog/proposals/heuristic-flow-control/1675265258687-c3df68a8-80e0-4311-816c-63480494850c.png)

![image.png](https://intranetproxy.alipay.com/skylark/lark/0/2023/png/67956773/1675265271198-5b045ced-8524-42a2-8b34-d7edbbd1f232.png#clientId=u54f9e7eb-38a1-4&from=paste&height=246&id=u4652443c&name=image.png&originHeight=890&originWidth=1798&originalType=binary&ratio=1&rotation=0&showTitle=false&size=57908&status=done&style=none&taskId=u624f980f-f1de-43ed-a068-9f1c38ab171&title=&width=497)
![image.png](/imgs/blog/proposals/heuristic-flow-control/1675265271198-5b045ced-8524-42a2-8b34-d7edbbd1f232.png)

#### 使用方法
使用方法与原本的负载均衡方法相同。只需要在consumer端将"loadbalance"设置为"p2c"或者"adaptive"即可。
Expand All @@ -51,7 +51,7 @@ Power of Two Choice算法简单但是经典,主要思路如下:

##### 相关指标
1. cpuLoad
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/26808016bc7f1ee83ab425e308074f17.svg#card=math&code=cpuLoad%20%3D%20cpu%E4%B8%80%E5%88%86%E9%92%9F%E5%B9%B3%E5%9D%87%E8%B4%9F%E8%BD%BD%20%2A%20100%20%2F%20%E5%8F%AF%E7%94%A8cpu%E6%95%B0%E9%87%8F&id=DLuwW)。该指标在provider端机器获得,并通过invocation的attachment传递给consumer端。
![img](/imgs/blog/proposals/heuristic-flow-control/26808016bc7f1ee83ab425e308074f17.svg)。该指标在provider端机器获得,并通过invocation的attachment传递给consumer端。

2. rt
rt为一次rpc调用所用的时间,单位为毫秒。
Expand All @@ -68,26 +68,26 @@ provider端在计算cpuLoad时的时间,单位是毫秒
6. currentTime
currentTime为最后一次计算load时的时间,初始化为currentProviderTime,单位是毫秒。
7. multiple
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/b60f036bd026b92129df8a6476922cc8.svg#card=math&code=multiple%3D%28%E5%BD%93%E5%89%8D%E6%97%B6%E9%97%B4%20-%20currentTime%29%2Ftimeout%20%2B%201&id=VpE3k)
![img](/imgs/blog/proposals/heuristic-flow-control/b60f036bd026b92129df8a6476922cc8.svg)

8. lastLatency
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/f2abbc771049cf4f3e492e93a258d699.svg#card=math&code=%5Cbegin%7Balign%2A%7D%0A%5Cend%7Balign%2A%7D%0A%0A&id=ynJBf)![img](https://intranetproxy.alipay.com/skylark/lark/__latex/8fb1af970b995232ebed2764a5706aab.svg#card=math&code=%5Cbegin%7Balign%2A%7D%0A%5Cbegin%7Bsplit%7D%0A%20%0AlastLatency%3D%20%5Cleft%20%5C%7B%0A%20%0A%5Cbegin%7Barray%7D%7Bll%7D%0A%20%0A%20%20%20%202%2Atimeout%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%20currentTime%3D%3DcurrentProviderTime%5C%5C%0A%20%0A%20%20%20%20lastLatency%20%3E%3E%20multiple%2C%20%20%20%20%20%26%20otherwise%5C%5C%0A%20%0A%0A%5Cend%7Barray%7D%0A%20%0A%5Cright.%0A%20%0A%5Cend%7Bsplit%7D%0A%20%0A%5Cend%7Balign%2A%7D&id=xAu3F)
![img](/imgs/blog/proposals/heuristic-flow-control/f2abbc771049cf4f3e492e93a258d699.svg)![img](/imgs/blog/proposals/heuristic-flow-control/8fb1af970b995232ebed2764a5706aab.svg)

9. beta
平滑参数,默认为0.5

10. ewma
lastLatency的平滑值![img](https://intranetproxy.alipay.com/skylark/lark/__latex/c26fdbae56f3a06c46434ae91185a3d6.svg#card=math&code=lastLatency%3Dbeta%20%2A%20lastLatency%20%2B%20%281%20-%20beta%29%20%2A%20lastLatency&id=absgN)
lastLatency的平滑值![img](/imgs/blog/proposals/heuristic-flow-control/c26fdbae56f3a06c46434ae91185a3d6.svg)

11. inflight
inflight为consumer端还未返回的请求的数量。
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/f429c4726dec484e70ee73e6a37c88dd.svg#card=math&code=inflight%3DconsumerReq%20-%20consumerSuccess%20-%20errorReq&id=UZIcf)
![img](/imgs/blog/proposals/heuristic-flow-control/f429c4726dec484e70ee73e6a37c88dd.svg)

12. load
对于备选后端机器x来说,若距离上次被调用的时间大于2*timeout,则其load值为0。
否则,

![img](https://intranetproxy.alipay.com/skylark/lark/__latex/0f56746b3643dc3ed0e019c24ad5f377.svg#card=math&code=load%20%3D%20CpuLoad%20%2A%20%28sqrt%28ewma%29%20%2B%201%29%20%2A%20%28inflight%20%2B%201%29%2F%28%28%28consumerSuccess%20%2F%20%28consumerReq%20%2B1%29%20%29%20%2A%20weight%29%2B1%29&id=TCYWX)
![img](/imgs/blog/proposals/heuristic-flow-control/0f56746b3643dc3ed0e019c24ad5f377.svg)

##### 算法实现
依然是基于P2C算法。
Expand All @@ -105,7 +105,7 @@ inflight为consumer端还未返回的请求的数量。
#### 总体效果

自适应限流部分的有效性实验我们在提供端机器配置尽可能大的情况下进行,并且为了凸显效果,在实验中我们将单次请求的复杂度提高,将超时时间尽可能设置的大,并且开启消费端的重试功能。
![image.png](https://intranetproxy.alipay.com/skylark/lark/0/2023/png/67956773/1675267798831-3da99681-577f-4e5a-b122-b87c8aba7299.png#clientId=u54f9e7eb-38a1-4&from=paste&height=239&id=u4de83107&name=image.png&originHeight=800&originWidth=1680&originalType=binary&ratio=1&rotation=0&showTitle=false&size=53641&status=done&style=none&taskId=u948ff148-1ec8-42ec-9712-0655b1e0336&title=&width=502)
![image.png](/imgs/blog/proposals/heuristic-flow-control/1675267798831-3da99681-577f-4e5a-b122-b87c8aba7299.png)

#### 使用方法
要确保服务端存在多个节点,并且消费端开启重试策略的前提下,限流功能才能更好的发挥作用。
Expand Down Expand Up @@ -141,7 +141,7 @@ noLoadLatency是单纯处理任务的延时,不包括排队时间。这是服

6. maxConcurrency
计算得到的当前服务提供端的最大并发值。
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/f40e48ebdb49648cf942714609808c52.svg#card=math&code=maxConcurrency%3Dceil%28maxQPS%20%2A%20%28%282%20%2B%20alpha%29%20%2A%20noLoadLatency%20-%20avgLatency%29%29&id=xO1h8)
![img](/imgs/blog/proposals/heuristic-flow-control/f40e48ebdb49648cf942714609808c52.svg)

##### 算法实现
当服务端收到一个请求时,首先判断CPU的使用率是否超过50%。如果没有超过50%,则接受这个请求进行处理。如果超过50%,说明当前的负载较高,便从HeuristicSmoothingFlowControl算法中获得当前的maxConcurrency值。如果当前正在处理的请求数量超过了maxConcurrency,则拒绝该请求。
Expand Down Expand Up @@ -169,17 +169,17 @@ exploreRatio=max(MinExploreRatio,exploreRatio-0.02)

8. maxQPS
窗口周期内QPS的最大值。
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/d5cf045bc17267befc176f3d76273267.svg#card=math&code=%5Cbegin%7Balign%2A%7D%0A%5Cbegin%7Bsplit%7D%0A%20%0AmaxQPS%3D%20%5Cleft%20%5C%7B%0A%20%0A%5Cbegin%7Barray%7D%7Bll%7D%0A%20%0A%20%20%20%20qps%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%20qps%20%3E%20maxQPS%5C%5C%0A%20%0A%20%20%20%20qps%2AemaFactor%20%2B%20maxQPS%2A%281-emaFactor%29%2C%20%20%20%20%20%26%20otherwise%5C%5C%0A%20%0A%0A%5Cend%7Barray%7D%0A%20%0A%5Cright.%0A%20%0A%5Cend%7Bsplit%7D%0A%20%0A%5Cend%7Balign%2A%7D&id=VbdUd)
![img](/imgs/blog/proposals/heuristic-flow-control/d5cf045bc17267befc176f3d76273267.svg)
9. noLoadLatency
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/8c700211f5c7a13403e3088df9cd9f43.svg#card=math&code=%5Cbegin%7Balign%2A%7D%0A%5Cbegin%7Bsplit%7D%0A%20%0AnoLoadLatency%3D%20%5Cleft%20%5C%7B%0A%20%0A%5Cbegin%7Barray%7D%7Bll%7D%0A%20%0A%20%20%20%20avgLatency%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%20noLoadLatency%20%3C%3D%200%5C%5C%0A%20%0A%20%20%20%20avgLatency%2AemaFactor%20%2B%20noLoadLatency%2A%281%20-%20emaFactor%29%2C%20%20%20%20%20%26%20otherwise%5C%5C%0A%20%0A%0A%5Cend%7Barray%7D%0A%20%0A%5Cright.%0A%20%0A%5Cend%7Bsplit%7D%0A%20%0A%5Cend%7Balign%2A%7D&id=hB7ED)
![img](/imgs/blog/proposals/heuristic-flow-control/8c700211f5c7a13403e3088df9cd9f43.svg)
10. halfSampleIntervalMs
半采样区间。默认为25000毫秒。
11. resetLatencyUs
下一次重置所有值的时间戳,这里的重置包括窗口内值和noLoadLatency。单位是微秒。初始为0.
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/1af4a6134ede96985302ee8a27f93df7.svg#card=math&code=resetLatencyUs%3DsamplingTimeUs%2B2%2AavgLatency%2C%0Aif%28remeasureStartUs%3C%3DsamplingTimeUs%29&id=vJHLa)
![img](/imgs/blog/proposals/heuristic-flow-control/1af4a6134ede96985302ee8a27f93df7.svg)
12. remeasureStartUs
下一次重置窗口的开始时间。
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/c7da904b9a4c890456499b09d01938d3.svg#card=math&code=remeasureStartUs%3DsamplingTimeUs%2B%28halfSampleIntervalMS%20%2B%20%E9%9A%8F%E6%9C%BA%E5%80%BC%29%2A1000&id=ket08)
![img](/imgs/blog/proposals/heuristic-flow-control/c7da904b9a4c890456499b09d01938d3.svg)
13. startSampleTimeUs
开始采样的时间。单位为微秒。
14. sampleCount
Expand All @@ -194,15 +194,15 @@ exploreRatio=max(MinExploreRatio,exploreRatio-0.02)
当前请求的latency。
19. qps
在该时间窗口内的qps值。
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/c0e8b30fc1ecf9438bc2d574fb3da8b6.svg#card=math&code=qps%3DtotalReqCount%2A1000000%2F%28samplingTimeUs%20-%20startSampleTimeUs%29&id=tzGm6)
![img](/imgs/blog/proposals/heuristic-flow-control/c0e8b30fc1ecf9438bc2d574fb3da8b6.svg)
20. avgLatency
窗口内的平均latency。
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/3a3acfdb05be7d3985835d43e492d3b9.svg#card=math&code=avgLatency%3DtotalSampleUs%20%2F%20sampleCount&id=gTnsb)
![img](/imgs/blog/proposals/heuristic-flow-control/3a3acfdb05be7d3985835d43e492d3b9.svg)
21. maxConcurrency
上一个窗口计算得到当前周期的最大并发值。
22. nextMaxConcurrency
当前窗口计算出的下一个周期的最大并发值。
![img](https://intranetproxy.alipay.com/skylark/lark/__latex/09852cc0ef125b43a37719796cb8baae.svg#card=math&code=%5Cbegin%7Balign%2A%7D%0A%5Cbegin%7Bsplit%7D%0A%20%0AnextMaxConcurrency%3D%20%5Cleft%20%5C%7B%0A%20%0A%5Cbegin%7Barray%7D%7Bll%7D%0A%20%0A%20%20%20%20ceil%28maxQPS%2AnoLoadLatency%2A0.9%2F1000000%29%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20remeasureStartUs%20%3C%3D%20samplingTimeUs%5C%5C%0A%20%0A%20%20%20%20ceil%28noLoadLatency%2AmaxQPS%2A%281%2BexploreRatio%29%2F1000000%29%2C%20%20%20%20%20%20otherwise%5C%5C%0A%20%0A%0A%5Cend%7Barray%7D%0A%20%0A%5Cright.%0A%20%0A%5Cend%7Bsplit%7D%0A%20%0A%5Cend%7Balign%2A%7D&id=kLKle)
![img](/imgs/blog/proposals/heuristic-flow-control/09852cc0ef125b43a37719796cb8baae.svg)

##### Little's Law
* 当服务处于稳定状态时:concurrency=latency*qps。这是自适应限流理论的基础。
Expand Down

0 comments on commit da40888

Please sign in to comment.