If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged appropriately.
Title: High contention on runtime feature check with "manually" created dispatcher threads
Description:
We have a use case where dispatcher threads are created after the instantiation of Envoy main server. Such threads cannot be registered to tls as Envoy main server already called "set" on tls. As such, when runtime features are checked (Runtime::runtimeFeatureEnabled, for instance), LoaderImpl::threadsafeSnapshot always take the slow path with a global lock, leading to degraded performance in our loadtests.
As easy fix seems to be optimizing LoaderImpl, which should be harmless for regular applications.