Skip to content

Conversation

@danielmitterdorfer
Copy link
Member

With this commit we exclude certain HTTP requests that are needed to inspect the cluster
from HTTP request limiting to ensure these commands are processed even in critical
memory conditions.

Relates #17951, relates #18145

With this commit we exclude certain HTTP requests that are needed to inspect the cluster
from HTTP request limiting to ensure these commands are processed even in critical
memory conditions.

Relates elastic#17951, relates elastic#18145
@s1monw
Copy link
Contributor

s1monw commented Jun 13, 2016

I wonder if we should go from a whitelist to a blacklist, it seems like we are adding more and more exceptions - maybe we should just put the memory hungry ones in there explicitly?

@danielmitterdorfer
Copy link
Member Author

danielmitterdorfer commented Jun 13, 2016

Previous exceptions were defined on transport level (OTOH, we have currently 3 exceptions defined on transport level). This PR adds support for HTTP level. I think the better option is to be conservative with exceptions and just use a whitelist but it would be pretty easy to use a blacklist instead (just swap the default and blacklist the relevant actions).

}
}

private static final class RestHandlerHolder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make more sense to add a method to the RestHandler interface default boolean canTripCircuitBreaker() { return true; } that would safe us all the extra indirection and is simple to override?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would also be consistent across all the methods the handler is registered?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also considered this but did not want to mix various aspects in the RestHandler interface. But I like the approach and can change that.

@s1monw
Copy link
Contributor

s1monw commented Jun 14, 2016

Previous exceptions were defined on transport level (OTOH, we have currently 3 exceptions defined on transport level). This PR adds support for HTTP level. I think the better option is to be conservative with exceptions and just use a whitelist but it would be pretty easy to use a blacklist instead (just swap the default and blacklist the relevant actions).

ok sure.... I left some comments

@danielmitterdorfer
Copy link
Member Author

@s1monw I've pushed a commit that addresses your comments. Could you please have another look?

@s1monw
Copy link
Contributor

s1monw commented Jun 15, 2016

LGTM

@danielmitterdorfer
Copy link
Member Author

Thanks; I'll merge soon.

@danielmitterdorfer danielmitterdorfer deleted the limit-exclude-http branch June 15, 2016 12:31
danielmitterdorfer added a commit that referenced this pull request Jun 15, 2016
With this commit we exclude certain HTTP requests that are needed to inspect the cluster
from HTTP request limiting to ensure these commands are processed even in critical
memory conditions.

Relates #17951, relates #18145, closes #18833
danielmitterdorfer added a commit that referenced this pull request Jun 15, 2016
With this commit we exclude certain HTTP requests that are needed to inspect the cluster
from HTTP request limiting to ensure these commands are processed even in critical
memory conditions.

Relates #17951, relates #18145, closes #18833
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants