Graylog2 / Graylog2/graylog2-server

Search request to Open/Elasticsearch should include Request Preference

Open
#18,632 0 comments 0 reactions 1 assignee Claimed by @Emy-01 View on GitHub
feature triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## What?

To increase the hitchance for caches in opensearch graylog should define the request preference parameter:
https://opensearch.org/docs/latest/api-reference/search/#the-preference-query-parameter

A solution would be to set the parameter to a "custom string" per graylog user e.g. the user_id.

## Why?

Search Request get routed ideally to the same shards, this increases the cache hit amount and decreases Disk Read I/O, as the "other" shard potentially does not have caches for this query.
Also decreases potential of incosistent results between to serach request as the shards are potentially in different refresh states.

## Your Environment

* Graylog Version: 5.2.4
* OpenSearch Version: 2.12
* MongoDB Version: 5
* Operating System: RHEL
* Browser version: %

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.