Migrate elasticsearch client to the new undici http client #116087
Labels
enhancement
New value added to drive a business result
Feature:elasticsearch
impact:high
Addressing this issue will have a high level of impact on the quality/strength of our product.
loe:medium
Medium Level of Effort
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Blocked on elastic/elasticsearch-js#1740
#108387 follow-up
elaticserarch-js client starting from v8.0 uses undici as a default HTTP client.
undici
has been rewreitten from scratches to supersede the standard http module ofnodejs
. Undici has significantly lower memory pressure and runtime overhead, comparing to the standardhttp
module.During the client version upgrade, I decided not to use
undici
client in the ES client for the following reasons:v8.0
FF date. It's better to test if during the development process thoroughly.undici
client afterv8.0
support v8.x of @elastic/elasticsearch apm-agent-nodejs#2355 (comment)undici
client doesn't supportkeepAlive
andmaxSockets
options https://github.com/elastic/elastic-transport-js/blob/main/src/connection/UndiciConnection.ts#L224-L226 We need to investigate whatundici
suggest using instead and how it can affectCore elasticsearch service
API.received 'get' method, expects on of ['GET', 'POST'...
)The text was updated successfully, but these errors were encountered: