-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kong rate limiting concurrent problem #2629
Comments
@qingziguanjun by default, the |
i am using just a single Kong node,so Then there is no rate-limit effort,i will never get such error: |
Hi, In the future please avoid cross posting to both the mailing list and GH issues. Since there is a discussion going on here (https://groups.google.com/forum/#!topic/konglayer/JRpoNnDuEZ8) I will close this. Thanks. |
For kong 0.10.2, i add rate limiting plugin for my api:
curl -X POST http://10.10.11.152:8001/apis/bjlife615/plugins
--data "name=rate-limiting"
--data "config.second=5"
--data "config.minute=100"
i use java code call the proxy url:
final String url = "http://kong.d.internetware.cn/bjlife/vericode615?apikey=sy1"; for(int i=0;i<10;i++){ System.out.println(HttpTool.sendGet(url, null)); }
i will get error:
{"message":"API rate limit exceeded"}
but if i use concurrent code:
for(int i=0;i<10;i++){ new Thread(){ public void run() { System.out.println(HttpTool.sendGet(url, null)); }; }.start(); }
i will never get rate limit error,how can i fix it?
The text was updated successfully, but these errors were encountered: