backnero commented on issue #2828:
URL: https://github.com/apache/apisix/issues/2828#issuecomment-733403778


   > 我无法在自己身边复制它。
   > 
   > 我使用给定的配置来更改和`limit-count`删除主机(这样我们就可以击中数百万次)。
   > 这是我的后端:
   > 
   > ```
   > worker_processes 1;
   > daemon off;
   > error_log stderr error;
   > events {
   >     worker_connections 65535;
   > }
   > http {
   >     server {
   >         listen 28000 reuseport;
   >         location = /v1/account/rsa {
   >             return 200 "rsa";
   >         }
   >         location = /v1/account/captcha {
   >             return 200 "captcha";
   >         }
   >         location / {
   >             access_by_lua_block {
   >                 ngx.exit(500)
   >             }
   >         }
   >     }
   > }
   > ```
   > 
   > wrk脚本:
   > 
   > ```
   > local paths = {
   >     "/account/captcha",
   >     "/account/rsa",
   > }
   > 
   > local counter = 1
   > local threads = {}
   > 
   > function setup(thread)
   >     math.randomseed(counter)
   >     counter = counter + 1
   > end
   > 
   > function request()
   >     local path = paths[math.random(2)]
   >     return wrk.format(nil, path)
   > end
   > ```
   > 
   > 然后运行:
   > 
   > ```
   > wrk -t 4 http://127.0.0.1:9080 -s rand.lua -d 600
   > Running 10m test @ http://127.0.0.1:9080
   >   4 threads and 10 connections
   >   Thread Stats   Avg      Stdev     Max   +/- Stdev
   >     Latency   420.31us  424.80us  33.87ms   98.41%
   >     Req/Sec     4.86k   556.32     7.02k    67.24%
   >   11608467 requests in 10.00m, 4.03GB read
   > Requests/sec:  19347.24
   > Transfer/sec:      6.88MB
   > ```
   > 
   > 仍然无法在1000万个请求中重现它。
   > 
   > @backnero
   > 能否提供包含错误响应的数据包捕获文件?
   
   If you use odd and even numbers for paths in the wrk script, polling has 
been reached.
   (I am not familiar with wrk, just a guess.)
   You can output the response message, if it appears
   rsa
   rsa
   rsa
   rsa
   ···
   or it could be
   captcha
   captcha
   captcha
   captcha
   captcha
   ···
   Is to reproduce my 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:
[email protected]


Reply via email to