alibaba / Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
https://sentinelguard.io/
Apache License 2.0
22.32k stars 8k forks source link

Add batch request support for transport of cluster flow control #849

Open sczyh30 opened 5 years ago

sczyh30 commented 5 years ago

Issue Description

Type: feature request

Describe what happened (or what feature you want)

In the current implementation, if there are multiple cluster rules (=N) of a resource, when checking for cluster rules, the token client will send up to N requests to the token server respectively to acquire tokens. Thus the performance might be bad when there're many cluster rules (e.g. gateway rules for different types of HTTP request items) and the network is not well. We might need to add batch request support for TokenService and cluster transport implementations to handle this.

linlinisme commented 5 years ago

give it to me :)

sczyh30 commented 5 years ago

give it to me :)

Thanks! But we've already finished an initial version for this. Maybe you could help us to review the code when the PR is ready :)

linlinisme commented 5 years ago

ok~

sczyh30 commented 5 years ago

@linlinisme You could refer to #850 for review.