question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance of `Client#child`

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
delvedorcommented, Sep 16, 2020

@joshdover I’m already working in that direction and I got nice results 😃 I’ll share something soon!

0reactions
joshdovercommented, Sep 16, 2020

It seems that the Object.assign behavior could be replaced with normal prototype inheritance instead. That way, not all the values have to be copied and JS can just walk the prototype chain to find the value. This may require that these option properties are not writeable so that code can’t change the parent client’s options and affect child clients.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Counseling Children and Youth in Times of Crisis
Successfully counseling the child client requires a collaborative approach. To develop an attorney-client relationship that encourages collaboration, you must ...
Read more >
Does health worker performance affect clients' health ...
Suboptimal healthcare quality may be a barrier to achieving child health improvements, yet little is known about the relationship between ...
Read more >
Outcome evaluation of behavioral parent training and client ...
Parent reports and paper and pencil tests of child deviance and parent satisfaction showed a superior outcome for behavioral over the client-centered and...
Read more >
Improving Worker Performance and Retention Through ...
Outlines how child welfare agencies can attract and support a highly skilled workforce and discusses specific recruitment strategies for child welfare leaders.
Read more >
Performance Outcome - Connections For Kids
Consumers (clients, employees, board surveys, staff relations, wellness, residential and school improvement); Programs Services (intake, strategic planning, and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found