-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Milestone
Description
Background and Motivation
As part of #30863, we're doing zero byte reads as a way to save memory. In some cases it might be better for performance (like in HTTPs based benchmarks), if we don't do a zero byte read before the actual read. Note, this isn't as big a deal as in the transport layer because it's not a real sys call we're making. We're calling into an in memory implementation.
Proposed API
namespace Microsoft.AspNetCore.Server.Kestrel.Https
{
public class HttpsConnectionAdapterOptions
{
+ public bool WaitForDataBeforeAllocatingBuffer { get; set; }
}Usage Examples
var host = new HostBuilder()
.ConfigureWebHost(webHostBuilder =>
{
webHostBuilder
.UseKestrel(options =>
{
options.Listen(IPAddress.Loopback, 5001, o => o.UseHttps(https => https.WaitForDataBeforeAllocatingBuffer = true ));
})
.UseStartup<Startup>();
})
.Build();
await host.RunAsync();Risks
None.
halter73
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions