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/24 07:11:05 UTC

[GitHub] [apisix] XuZhaoPro opened a new issue #4294: request help:

XuZhaoPro opened a new issue #4294:
URL: https://github.com/apache/apisix/issues/4294


   We want to use apisix for kubernetes http services. Now we has exposed the pod's ip and port into upstream. So the apisix can trasport flow to kubernetes pods.We have many services (serval thounsand), so the number of the route and upstream will be large. At this situation, the upstreams chanage frequently as the pods change frequently. 
   I want to know the performance (such as Latency, Qps and so on) when apisix support thounsands of routes and upsteams(and the route or upstream data change frequently). 
   Fisrt: it seems like that:  each nginx worker has its own route and upstream cache,  the whole cache will be rebuilt after a route in etcd change. I don't think it is efficient.
   Sencond: is the way(now I do not know the details yet) to match router by using radixtree efficient or not? Do you have some test results? 
   Looking forward to your explanation.   Thank you.
                     
   
   ### Issue description
   
   ### Environment
   
   Request help without environment information will be ignored or closed.
   
   * apisix version (cmd: `apisix version`):  2.4
   * OS (cmd: `uname -a`):     centos 7.3 
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):     openresty v1.19.3.1
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):   v3.4.15
   * apisix-dashboard version, if have:
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`):


-- 
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] tokers commented on issue #4294: request help: performance when apisix support many routes

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


   > We want to use apisix for kubernetes http services. Now we has exposed the pod's ip and port into upstream. So the apisix can trasport flow to kubernetes pods.We have many services (serval thounsand), so the number of the route and upstream will be large. At this situation, the upstreams chanage frequently as the pods change frequently.
   > I want to know the performance (such as Latency, Qps and so on) when apisix support thounsands of routes and upsteams(and the route or upstream data change frequently).
   > Fisrt: it seems like that: each nginx worker has its own route and upstream cache, the whole cache will be rebuilt after a route in etcd change. I don't think it is efficient.
   > Sencond: is the way(now I do not know the details yet) to match router by using radixtree efficient or not? Do you have some test results?
   > Looking forward to your explanation. Thank you.
   > 
   > ### Issue description
   > ### Environment
   > Request help without environment information will be ignored or closed.
   > 
   > * apisix version (cmd: `apisix version`):  2.4
   > * OS (cmd: `uname -a`):     centos 7.3
   > * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):     openresty v1.19.3.1
   > * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):   v3.4.15
   > * apisix-dashboard version, if have:
   > * luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   
   > Fisrt: it seems like that: each nginx worker has its own route and upstream cache, the whole cache will be rebuilt after a route in etcd change. I don't think it is efficient.
   
   Does the change frequent in your case?
   
   > Sencond: is the way(now I do not know the details yet) to match router by using radixtree efficient or not? Do you have some test results?
   
   Don't worry about this, the time complexity is not related to the number routes.


-- 
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] tokers commented on issue #4294: request help: performance when apisix support many routes

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


   > @tokers , the route does not change frequently. But when it needs to change, the nginx worker will not work unitl the route cache has finished rebuilt. Maybe during the small duration, the APISIX node is having a bad time window that not performs as bofore. While I am sure it will recover soon, but it is a problem that asked to be resovled in my company.
   > And another one question, the k8s pods change frequently. Is it a perfmance problem for APISIX watching and updating when serving requests?
   
   Maybe we can optimize the route building process, let it be asynchronous, and replace the current radix tree object after the building is done, what's more, adding some points in the building process so that the building coroutine can be yielded and requests can still be handled (with the old radix tree object). Anyway, just my shallow thoughts.
   
   Upstream Nodes changes won't be a problem as it's referenced passively.


-- 
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] XuZhaoPro commented on issue #4294: request help: performance when apisix support many routes

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


   @tokers , the route does not change frequently. But when it needs to change, the nginx worker will not work unitl the route cache has finished rebuilt. Maybe during the small duration, the APISIX node is having a bad time window that not performs as bofore. While I am sure it will recover soon, but it is a problem that asked to be resovled in my company. 
   And another one question, the k8s pods change frequently. Is it a perfmance problem for APISIX watching and updating when serving requests?


-- 
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