Skip to content

ServerCertificateSelector callback needs to be async, otherwise any async work in callback may cause deadlock with threadpool (eg. logging failure to disk). #20981

@rickyburrell

Description

@rickyburrell

We have a kestrel based production load balancer edge hosted on large site.

When malicious clients open many https connections based on invalid host names, no cert is available and we async log this failure to W3C log file.

As the callback method is not async, we end up blocking most of the thread pool threads waiting for async logging to be scheduled and starvation occurs.

Surely it is easy enough to make this callback async?

tasks
threads PNG

Metadata

Metadata

Labels

api-needs-workAPI needs work before it is approved, it is NOT ready for implementationarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-kestrel

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions