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 2020/03/12 02:27:02 UTC

[GitHub] [incubator-apisix] wwd5613 opened a new issue #1233: bug: route by radixtree_host_uri Stress Testing cannot reach expect

wwd5613 opened a new issue #1233: bug: route by radixtree_host_uri Stress Testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233
 
 
   ### I set 10 to 5000 route with host,like
   {
       "uri": "*",
       "hosts": ["www.websockettest1.com"],
        "vars":[["server_port","==","80"]],
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "172.28.73.60:80": 1
           }
       }
   }
   and set config.yaml 
     router:
        http: 'radixtree_host_uri'
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.0
   * OS: Centos7.4 8c16g
   
   ### Minimal test code / Steps to reproduce the issue
   1.wrk -t16 -c200 -d300s -T300s --latency  --script=get500.lua http://www.websockettest1/test?a=123
   2.get500.lua 
   wrk.method = "GET"  
   wrk.host = "www.testwaf1.com"
   wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
   wrk.headers["Accept-Encoding"] = "gzip, deflate"
   wrk.headers["Accept-Language"] = "zh-CN,zh;q=0.9"
   wrk.headers["Cache-Control"] = "no-cache"
   wrk.headers["Connection"] = "keep-alive"
   --wrk.headers["Connection"] = "close"
   wrk.headers["Cookie"] = "JSESSIRE45ONID=988051FA6F8638AD356HY0FC40DEB861604F677676GHG878123EDGTE1245; name=%22wuwng%22"
   wrk.headers["Host"] = "www.websockettest1"
   wrk.headers["Referer"] = "http://www.websockettest1/"
   wrk.headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"
   wrk.headers["Pragma"] = "no-cache"
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   ![QQ图片20200312101743](https://user-images.githubusercontent.com/2143396/76480831-d0b37200-644a-11ea-9cdd-ebbcfc4f6378.jpg)
   Stress Testing Contrast:
     tps of source site is 16W,
     tps of source site pass by apisix is 7W
   and cpu is near 100% with 20% sys cost.
   ![QQ图片20200312102413](https://user-images.githubusercontent.com/2143396/76481170-c5ad1180-644b-11ea-8227-316e7e5d5e0f.jpg)
   
   and Flame Graphs is as follow
   ![微信截图_20200312102431](https://user-images.githubusercontent.com/2143396/76481209-e07f8600-644b-11ea-9042-4d81c7c50413.png)
   
   
   ### What's the expected result?
     tps can be higher
   

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] wwd5613 commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
wwd5613 commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-599862032
 
 
   i test radixtree_uri scene whith normal route,the result is the same, cpu is 90%+.tps 7w.firemap as follow
   ![微信截图_20200317113733](https://user-images.githubusercontent.com/2143396/76819752-1c4b8e80-6844-11ea-8a2a-7a2777f841b2.png)
   
   

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


With regards,
Apache Git Services

[GitHub] [apisix] membphis closed issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
membphis closed issue #1233:
URL: https://github.com/apache/apisix/issues/1233


   


----------------------------------------------------------------
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] [incubator-apisix] membphis edited a comment on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-599961051
 
 
   @wwd5613 
   
   For your scene, just use `radixtree_host_uri`.
   
   If you still have problems, you need to provide more environmental information.
   
   For example:
   
   > wrk -> apisix/nginx proxy -> nginx server
   
   wrk:  `wrk http://127.0.0.1:9080/hello -H "host: www.websockettest500.com"`
   
   **apisix**: enable radixtree_host_uri and 1 worker
     
   ```json
   {
       "uri": "*",
       "hosts": ["www.websockettest1.com"],
        "vars":[["server_port","==","80"]],
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "172.28.73.60:80": 1
           }
       }
   }
   ```
   
   **nginx proxy**: proxy pass, 1 worker
   
       location / {
               proxy_pass  http://127.0.0.1:1980/;
           }
   
   **nginx server**: content_by_lua 'ngx.say("cur time: ", ngx.time())', 1 worker
   
   Then we can compare the TPS  between APISIX and Nginx proxy.
   
   Here is my result:
   APISIX: Requests/sec:  12936.45
   Nginx proxy: Requests/sec:  10467.44 (no keepalive)
   

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] wwd5613 edited a comment on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
wwd5613 edited a comment on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-599894781
 
 
   > please prove your route rules, we need to confirm it
   
   ```
   {
   "upstream":{
      "nodes":{
   "172.28.73.60:80":1
   },
       "type":"roundrobin"},
   "uri":"*"
   }
   ```

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-599961051
 
 
   @wwd5613 
   
   For your scene, just use `radixtree_host_uri`.
   
   If you still have problems, you need to provide more environmental information.
   
   For example:
   
   > wrk -> apisix/nginx proxy -> nginx server
   
   wrk:  `wrk http://127.0.0.1:9080/hello -H "host: www.websockettest500.com"`
   
   **apisix**: enable radixtree_host_uri and 1 worker
     
   ```json
   {
       "uri": "*",
       "hosts": ["www.websockettest1.com"],
        "vars":[["server_port","==","80"]],
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "172.28.73.60:80": 1
           }
       }
   }
   ```
   
   **nginx proxy**: proxy pass, 1 worker
   
       location / {
               proxy_pass  http://127.0.0.1:1980/;
           }
   
   **nginx server**: content_by_lua 'ngx.say("cur time: ", ngx.time())', 1 worker
   
   Then we can compare the TPS  between APISIX and Nginx proxy.
   
   Here is my result:
   APISIX: Requests/sec:  12936.45
   Nginx proxy: Requests/sec:  10467.44
   

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-598144717
 
 
   @wwd5613 if you mainly use `host`, you should use router `radixtree_host_uri`. please confirm this first.
   
   https://github.com/apache/incubator-apisix/blob/master/conf/config.yaml#L59

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-598141370
 
 
   @membphis please take a look

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-598145350
 
 
   > @wwd5613 if you mainly use `host`, you should use router `radixtree_host_uri`. please confirm this first.
   > 
   > https://github.com/apache/incubator-apisix/blob/master/conf/config.yaml#L59
   
   yes, it's `radixtree_host_uri`, please read the issue carefully.

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] wwd5613 commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
wwd5613 commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-599894781
 
 
   > please prove your route rules, we need to confirm it
   
   {
   "upstream":{
      "nodes":{
   "172.28.73.60:80":1
   },
       "type":"roundrobin"},
   "uri":"*"
   }
   
   

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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis removed a comment on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
membphis removed a comment on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-599863213
 
 
   please prove your route rules, we need to confirm 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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-599863213
 
 
   please prove your route rules, we need to confirm 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


With regards,
Apache Git Services

[GitHub] [apisix] membphis commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

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


   old issue, closed


----------------------------------------------------------------
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] [incubator-apisix] membphis commented on issue #1233: bug: route by radixtree_host_uri stress testing cannot reach expect

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1233:
URL: https://github.com/apache/incubator-apisix/issues/1233#issuecomment-638586816


   @wwd5613 do you still have any problem?


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