我正在努力弄清楚如何在front-envoy中为其他服务设置速率限制。
我参考了他们的文档,但无法看到配置实际上是如何工作的。我也找到了lyft ratelimit,但这里也没有说明如何使用此配置。
有人能帮帮我吗?
我正在努力弄清楚如何在front-envoy中为其他服务设置速率限制。
我参考了他们的文档,但无法看到配置实际上是如何工作的。我也找到了lyft ratelimit,但这里也没有说明如何使用此配置。
有人能帮帮我吗?
- name: envoy.ratelimit
typed_config:
"@type": "type.googleapis.com/envoy.config.filter.network.rate_limit.v2.RateLimit"
stat_prefix: ratelimiter
domain: myservice-ratelimiter
descriptors:
- entries:
- key: path
value: "/"
failure_mode_deny: true
rate_limit_service:
grpc_service:
envoy_grpc:
cluster_name: my-ratelimit-cluster # define a Cluster pointing to the ratelimit service
您可以按照以下步骤配置Lyft的速率限制服务(请参阅Lyft的示例config.yaml):
domain: myservice-ratelimiter
descriptors:
- key: path
value: "/"
rate_limit:
unit: second
requests_per_unit: 50