othiym23 / node-continuation-local-storage

implementation of https://github.com/joyent/node/issues/5243
BSD 2-Clause "Simplified" License
1.13k stars 207 forks source link

Question about performance #141

Open wcauchois opened 5 years ago

wcauchois commented 5 years ago

Hi, is there any information about the overhead/performance impact of using this library?

I'm interested as to whether it's something that could be used on every request of a high QPS service, or whether it's more intended to be used sparingly (for example, a great application of this seems like it would be tracing, and you typically trace some smaller proportion of requests).

Qard commented 5 years ago

This was pulled out of the New Relic APM agent, and has been used in several other APM agents too, so yes, it's usable in that sort of scenario. However, async_hooks-based CLS implementations like cls-hooked are probably better these days.