Skip to content
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

Rate limiting plugin with Unlogged batch warning #681

Closed
fjsousa opened this issue Nov 3, 2015 · 5 comments
Closed

Rate limiting plugin with Unlogged batch warning #681

fjsousa opened this issue Nov 3, 2015 · 5 comments
Labels
task/feature Requests for new features in Kong
Milestone

Comments

@fjsousa
Copy link

fjsousa commented Nov 3, 2015

I'm getting this warning when doing ab testing in a single endpoint, with the rate limit plugin enabled.

WARN  11:47:11 Unlogged batch covering 6 partitions detected against table [kong.ratelimiting_metrics]. You should use a logged batch for atomicity, or asynchronous writes for performance.
@thibaultcha
Copy link
Member

I am guessing you have multiple periods enabled for the same API? Like year, month, day, etc?

If this is the case then this makes sense, and the rate-limiting increasing counters should be done via independent writes rather than a single batch. Because batching with many partitions (which happens when you have many rate-limiting periods) is inefficient.

Won't have time to fix right now but this will have to be addressed in the future. Thanks for reporting!

@thibaultcha thibaultcha added area/DAO task/feature Requests for new features in Kong labels Nov 3, 2015
@fjsousa
Copy link
Author

fjsousa commented Nov 4, 2015

I had seconds and hour but then I did the same ab test with this rate-limiting setup:

    "api_id": "f459f0be-e924-496a-c944-e63683207117",
    "id": "33db7fa3-8e1b-470c-c7be-645beb83eef8",
    "created_at": 1446638410000,
    "enabled": true,
    "name": "rate-limiting",
    "config": {
        "second": 5
    }

and got the same warning

@thibaultcha
Copy link
Member

Yeah actually I remember no matter how many limits you have the plugin will still increment all the limits to keep track of the calls. So, 6 partitions...

@fjsousa
Copy link
Author

fjsousa commented Nov 4, 2015

got it

thibaultcha added a commit that referenced this issue Dec 12, 2015
rate-limiting plugins don't use a batch statement anymore to increment
the counters, which used to overload a coordinator and generate a
warning. Since the new driver uses load balancing policies, we increment
the counters with regular queries.
@thibaultcha
Copy link
Member

This was fixed since #803 got merged. Leaving opened until the release. Thanks for reporting!

@thibaultcha thibaultcha modified the milestone: Jan 2016 Dec 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task/feature Requests for new features in Kong
Projects
None yet
Development

No branches or pull requests

2 participants