You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/18 05:50:31 UTC

[GitHub] [apisix] azura27 opened a new issue #4265: bug: radixtree new takes too long, 8930 APIs takes 200 ms with lua-resty-radixtree v2.2, 10s with v2.8.0

azura27 opened a new issue #4265:
URL: https://github.com/apache/apisix/issues/4265


   ### Issue description
   
   ### Environment
   
   Bug report without environment information will be ignored or closed.
   
   * apisix version (cmd: `apisix version`): 2.0
   * OS (cmd: `uname -a`): 3.10.0-693.21.1.el7.x86_64  GNU/Linux
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 1.17.8.2
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.4.10
   * apisix-dashboard version, if have:
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`):2.3.0
   
   ### Minimal test code / Steps to reproduce the issue
   PUT 4000 APIs to APISIX if etcd 4M limition not solved(we cover this limit in pull data 9 times with different dir prefix /apisix/routes/i), it could take 1.5 s with lua-resty-radixtree   v2.2,
   
   Bug report without steps to reproduce will be ignored or closed.
   
   1. PUT 8930 APIs to apisix
   2. visit one API and recors time spent in function match()
   3.
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   time spent too long, over 200ms
   ### What's the expected result?
   expect time spent less than 10ms like KONG


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4265: bug: radixtree new takes too long, 8930 APIs takes 10s with lua-resty-radixtree v2.2, 200 ms with v2.8.0

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4265:
URL: https://github.com/apache/apisix/issues/4265#issuecomment-842959453


   Can you give your test data and how you access the API so that we can analyze it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] azura27 commented on issue #4265: bug: radixtree new takes too long, 8930 APIs takes 10s with lua-resty-radixtree v2.2, 200 ms with v2.8.0

Posted by GitBox <gi...@apache.org>.
azura27 commented on issue #4265:
URL: https://github.com/apache/apisix/issues/4265#issuecomment-843081695


   link:https://pan.baidu.com/s/1WlI8Llrg9dpXbaJP2AbeAA 
   code:fbzh 
   etcdctl  get routes data file here, there are some new key parameter added in our routes definition,  mind your attention


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Firstsawyou commented on issue #4265: bug: radixtree new takes too long, 8930 APIs takes 10s with lua-resty-radixtree v2.2, 200 ms with v2.8.0

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #4265:
URL: https://github.com/apache/apisix/issues/4265#issuecomment-842885512


   `lua-resty-radixtree` has many optimizations and fixes between v2.2 and v2.8.0, please refer to here:
   https://github.com/api7/lua-resty-radixtree/commits/master?before=61b2fc75a6ec4816e54e29c38a7656f83460442a+35&branch=master
   
   https://github.com/api7/lua-resty-radixtree/commit/6ec8e61668fb6800e0e80f607c2682b8295e084a
   
   Therefore, you should use the latest version of `lua-resty-radixtree`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] azura27 commented on issue #4265: bug: radixtree new takes too long, 8930 APIs takes 10s with lua-resty-radixtree v2.2, 200 ms with v2.8.0

Posted by GitBox <gi...@apache.org>.
azura27 commented on issue #4265:
URL: https://github.com/apache/apisix/issues/4265#issuecomment-843706521


   > Thanks. I will take a close look later. Too busy recently.
   > And you can try to change the router to radixtree_host_uri to see if the performance is improved.
   > https://github.com/apache/apisix/blob/master/docs/en/latest/architecture-design/router.md
   
   OK thanks a lot


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4265: bug: radixtree new takes too long, 8930 APIs takes 10s with lua-resty-radixtree v2.2, 200 ms with v2.8.0

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4265:
URL: https://github.com/apache/apisix/issues/4265#issuecomment-843672155


   Thanks. I will take a close look later. Too busy recently.
   And you can try to change the router to radixtree_host_uri to see if the performance is improved.
   https://github.com/apache/apisix/blob/master/docs/en/latest/architecture-design/router.md
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] azura27 commented on issue #4265: bug: radixtree new takes too long, 8930 APIs takes 10s with lua-resty-radixtree v2.2, 200 ms with v2.8.0

Posted by GitBox <gi...@apache.org>.
azura27 commented on issue #4265:
URL: https://github.com/apache/apisix/issues/4265#issuecomment-842891403


   > `lua-resty-radixtree` has many optimizations and fixes between v2.2 and v2.8.0, please refer to here:
   > https://github.com/api7/lua-resty-radixtree/commits/master?before=61b2fc75a6ec4816e54e29c38a7656f83460442a+35&branch=master
   > 
   > [api7/lua-resty-radixtree@6ec8e61](https://github.com/api7/lua-resty-radixtree/commit/6ec8e61668fb6800e0e80f607c2682b8295e084a)
   > 
   > Therefore, you should use the latest version of `lua-resty-radixtree`.
   
   The latest takes 200ms too, so when there is a schedule for optimization, please take this in too, Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4265: bug: radixtree new takes too long, 8930 APIs takes 10s with lua-resty-radixtree v2.2, 200 ms with v2.8.0

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4265:
URL: https://github.com/apache/apisix/issues/4265#issuecomment-842949425


   KONG's router is good at matching exact path but not good at prefix path match, not even say it doesn't support complex vars rule.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org