-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add a softlimit to the number of open scroll contexts per node #25244
Comments
relates to #11511 |
Should the limit only apply to scrolls and not regular searches? Should the number of ongoing regular searches count or just scrolls? |
I first thought scrolls only but we can just keep it simple and also so all of them. I already have a branch that does all. |
@s1monw |
@s1monw |
@alexshadow007 I wonder if we should rather put it directly into SearchService where we create the context? |
Pinging @elastic/es-search-aggs |
@pushpavanthar it's not fixed afaik |
Hi @pushpavanthar I would like to pick up this issue. Are you still working on it? |
@RuiGuedes No, please go ahead. |
It might be nice to have different limits for different scroll activities, like two pools one for fast/short lived scrolls and another for longer running scrolls. The idea might be to have a much smaller longer running scroll max limit to keep those long open scroll contexts to a minimum number vs a larger max limit for short running scrolls. This would also need some default if there was more than one way to scroll. For bonus points, it'd be awesome to be able to tie scroll limits into Security and limit resource usage based on security characteristics like role or user. I realise this might be a separate feature but might be good to keep in mind when designing the basic functionality as part of this feature. |
This change adds a soft limit to open scroll contexts that can be controlled with the dynamic cluster setting `search.max_open_scroll_context` (defaults to 500).
Today if a user creates a large number of scroll contexts without clearing them using a scroll ID we go and clean things up once a timeout is reached. This has several problems:
we do protect against some of these but it would be nicer to reject scroll requests / new sticky context creation if there are too many of them. This change is rather a low hanging fruit but I suspect a big impact if a users has the related problems. A rejected scroll search would immediately be visible to the user.
The text was updated successfully, but these errors were encountered: