Draft: Add elasticsearch client adapter settings
What does this MR do and why?
AI Summary
This change improves how GitLab connects to its search service (Elasticsearch) by adding better connection management settings behind a feature flag.
The main improvement is adding connection pool limits and cleanup rules to prevent too many connections from building up over time, which could slow down search performance. It sets limits like maximum 10 connections per search server and 50 total connections across all servers.
The change also adds "keepalive" settings that help maintain healthy connections by periodically checking if they're still working, and automatically refreshes connections every 5 minutes to prevent them from becoming stale.
Since this is a potentially impactful change to search infrastructure, it's protected by a feature flag that's initially turned off, allowing GitLab to safely test and gradually roll out these connection improvements without affecting all users at once.
The code also includes comprehensive tests to ensure the new connection settings work properly when the feature is enabled, and that the old behavior is preserved when it's disabled.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.