mirror of https://github.com/istio/istio.io.git
fix errors in rate limiting (#2756)
This commit is contained in:
parent
73a2ef4bc9
commit
d303abd43a
|
@ -159,18 +159,17 @@ keywords: [策略,限额]
|
||||||
namespace: istio-system
|
namespace: istio-system
|
||||||
spec:
|
spec:
|
||||||
quotas:
|
quotas:
|
||||||
|
|
||||||
- name: requestcount.quota.istio-system
|
- name: requestcount.quota.istio-system
|
||||||
maxAmount: 500
|
maxAmount: 500
|
||||||
validDuration: 1s
|
validDuration: 1s
|
||||||
- dimensions:
|
- dimensions:
|
||||||
destination: reviews
|
destination: reviews
|
||||||
maxAmount: 1
|
maxAmount: 1
|
||||||
validDuration: 5s
|
validDuration: 5s
|
||||||
- dimensions:
|
- dimensions:
|
||||||
destination: productpage
|
destination: productpage
|
||||||
maxAmount: 2
|
maxAmount: 2
|
||||||
validDuration: 5s
|
validDuration: 5s
|
||||||
{{< /text >}}
|
{{< /text >}}
|
||||||
|
|
||||||
`memquota` 处理程序定义了 3 种不同的速率限制方案。在没有 `overrides` 生效的缺省情况下,每秒限制请求为 `500` 次。还定义了两个 `overrides` 条目:
|
`memquota` 处理程序定义了 3 种不同的速率限制方案。在没有 `overrides` 生效的缺省情况下,每秒限制请求为 `500` 次。还定义了两个 `overrides` 条目:
|
||||||
|
@ -194,7 +193,6 @@ keywords: [策略,限额]
|
||||||
spec:
|
spec:
|
||||||
connectionPoolSize: 10
|
connectionPoolSize: 10
|
||||||
quotas:
|
quotas:
|
||||||
|
|
||||||
- name: requestcount.quota.istio-system
|
- name: requestcount.quota.istio-system
|
||||||
maxAmount: 500
|
maxAmount: 500
|
||||||
validDuration: 1s
|
validDuration: 1s
|
||||||
|
@ -203,14 +201,14 @@ keywords: [策略,限额]
|
||||||
overrides:
|
overrides:
|
||||||
- dimensions:
|
- dimensions:
|
||||||
destination: reviews
|
destination: reviews
|
||||||
maxAmount: 1
|
maxAmount: 1
|
||||||
- dimensions:
|
- dimensions:
|
||||||
destination: productpage
|
destination: productpage
|
||||||
source: 10.28.11.20
|
source: 10.28.11.20
|
||||||
maxAmount: 500
|
maxAmount: 500
|
||||||
- dimensions:
|
- dimensions:
|
||||||
destination: productpage
|
destination: productpage
|
||||||
maxAmount: 2
|
maxAmount: 2
|
||||||
{{< /text >}}
|
{{< /text >}}
|
||||||
|
|
||||||
`redisquota` handler 定义了 4 种不同的速率限制方案。在没有 `overrides` 生效的缺省情况下,每秒限制请求为 `500`次。它使用 `ROLLING_WINDOW` 算法进行配额检查,因此为 `ROLLING_WINDOW` 算法定义了 500ms 的 `bucketDuration`。还定义了 `overrides` 条目:
|
`redisquota` handler 定义了 4 种不同的速率限制方案。在没有 `overrides` 生效的缺省情况下,每秒限制请求为 `500`次。它使用 `ROLLING_WINDOW` 算法进行配额检查,因此为 `ROLLING_WINDOW` 算法定义了 500ms 的 `bucketDuration`。还定义了 `overrides` 条目:
|
||||||
|
@ -287,7 +285,7 @@ keywords: [策略,限额]
|
||||||
quotaSpecs:
|
quotaSpecs:
|
||||||
- name: request-count
|
- name: request-count
|
||||||
namespace: istio-system
|
namespace: istio-system
|
||||||
services:
|
services:
|
||||||
- name: productpage
|
- name: productpage
|
||||||
namespace: default
|
namespace: default
|
||||||
# - service: '*'
|
# - service: '*'
|
||||||
|
@ -328,7 +326,7 @@ spec:
|
||||||
|
|
||||||
以 `jason` 身份登录并反复刷新 `productpage`。现在你应该能够毫无问题地做到这一点。
|
以 `jason` 身份登录并反复刷新 `productpage`。现在你应该能够毫无问题地做到这一点。
|
||||||
|
|
||||||
1. 未登录时验证速率限制*是否适用*。
|
1. 验证速率限制在未登录时*适用*。
|
||||||
|
|
||||||
注销 `jason` 并反复刷新 `productpage` 。
|
注销 `jason` 并反复刷新 `productpage` 。
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue