reboot icon indicating copy to clipboard operation
reboot copied to clipboard

Investigate different thread allocation semantics under the hood

Open farmdawgnation opened this issue 7 years ago • 0 comments

It's been reported that every time an Http is constructed, we get 2*$numCpus threads created by AHC because we create an AHC client on each invocation. Some things to look at:

  • One option that's been suggested is to share an AHC client instance under the hood, which is thread-safe "with qualification" - specifically so long as you don't do anything not-thread-safe in your callbacks. The with qualification bit is what scares me about that.
  • Perhaps a more targeted approach is to expose or better document a knob for the number of threads that we should allocate when we build the client.

farmdawgnation avatar Mar 07 '18 01:03 farmdawgnation