According to the documentation of the scroll API, scroll operations are discouraged for “frequent user queries”.
Because search contexts consume a lot of memory, we suggest you don’t use the
scroll
operation for frequent user queries.
What I am wondering is, do search contexts only consume a lot of memory the longer they live, or does creating a scroll already have a negative effect on memory?
Imagine the following situation:
A multi-node system creates scrolls frequently (more than once per second, for example), and using slices, scrolls over a large amount of data in parallel. After only seconds, the scrolls are completed and promptly deleted.
Of course, loading and returning all that data does create a considerable amount of CPU load.
What I am wondering is if such a situation creates a disproportionate memory footprint due to the search contexts, although the scrolls don’t live that long.
Any input is appreciated!