Open
Description
Kestrel is designed for DI. But there is a public way to create it directly: KestrelServer.cs
This is forcing various hacks on us:
- The real implementation of
IServer
is internal -KestrelServerImpl
- and is wrapped byKestrelServer
. - Adding new DI types to KestrelServer forces us to consider how
KestrelServer
passes them toKestrelServerImpl
. See metrics PR and Andrew's TLS PR. - Falling behind on functionality. For example,
KestrelServer
doesn't support HTTP/3 (no ctor overload was added for specifying multiplexed transports).
Prior art in this area:
IISHttpServer
is internal.MessagePump
is internal.TestServer
is public.
I think we should obsolete KestrelServer
and require creating it with a builder.