Skip to content

Performance of Client#child #1290

Closed
@kobelb

Description

@kobelb

Kibana uses Client#child to create an instance of the Elasticsearch client that has the authentication headers for the current end-user. As such, almost every single HTTP request to Kibana will end up calling Client#child. While doing some load testing of Kibana, the performance of Client#child is looking like a bottleneck.

During a load-test where 1000 users hit a simple HTTP Kibana API which performs authentication, I'm seeing approximately 5% of the CPU time being spent within Client#child:

Screen Shot 2020-08-24 at 2 03 47 PM

The biggest culprits appear to be the use of Object.assign and ESAPI.

There are some situations where Kibana can not call Client#child until it's absolutely needed, which definitely helps, but if we can optimize the performance of Client#child it will greatly help the general performance of Kibana.

If it's not feasible to improve the performance of Client#child, Kibana can also potentially take advantage of the overloaded methods which support the TransportRequestOptions, but there are some potential complications with this approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions