Skip to content

Obsolete KestrelServer (just the public type, not all of Kestrel!) #47686

Open
@JamesNK

Description

@JamesNK

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 by KestrelServer.
  • Adding new DI types to KestrelServer forces us to consider how KestrelServer passes them to KestrelServerImpl. 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:

I think we should obsolete KestrelServer and require creating it with a builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsblockedThe work on this issue is blocked due to some dependency

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions