You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shenyu.apache.org by 邹昌福 <zc...@163.com> on 2022/05/09 13:49:07 UTC

About selector match only once (Issue #3367)

Hello to all the community.


Currently every request in the shenyu gateway needs to be matched by traversing all the selector of the plugin.


If there is a large number of interfaces in the gateway, it will cause a lot of performance degradation in the gateway.


We have discussed some ideas, for the time being we intend to use uri as key and cache the matching selector for each request。


Ignore the selector condition for now.


 If you have a better solution, welcome to join the discussion!

Re: About selector match only once (Issue #3367)

Posted by XiaoYu <xi...@apache.org>.
Hi

uri as a key is appropriate.

But the data structure should be one key for multiple values,
(MultiValueMap see in Guava)

When there is only one values, use it directly, when there is more
than one values, need to do the exact match again (a few scenarios)

邹昌福 <zc...@163.com> 于2022年5月9日周一 21:49写道:
>
> Hello to all the community.
>
>
> Currently every request in the shenyu gateway needs to be matched by traversing all the selector of the plugin.
>
>
> If there is a large number of interfaces in the gateway, it will cause a lot of performance degradation in the gateway.
>
>
> We have discussed some ideas, for the time being we intend to use uri as key and cache the matching selector for each request。
>
>
> Ignore the selector condition for now.
>
>
>  If you have a better solution, welcome to join the discussion!