Improve management of Elasticsearch client socket pools #137734
Labels
Feature:elasticsearch
performance
Supportability
Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better.
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Currently, every time we instantiate elasticsearch-js's
Client
class, we are creating a new HTTP(s)Agent
that is capable of connecting to multiple origins, and managing its own pool of sockets.In practice, what that means is if we have two
Client
instances that connect to the same ES nodes, they will NOT be sharing the same pool of sockets. We will not benefit from idle sockets, and eventually we will have to establish a few more secure connections to ES (aka more TCP + TLS handshakes). Also, it makes things very difficult if we want to track / limit maximum number of open connections, as we don't have control of which Agent instances / sockets pools exist.We want to be able to group the
Client
instances logically by domain (e.g. those that are intended for data retrieval, those that are for monitoring purposes, etc). This will allow:The text was updated successfully, but these errors were encountered: