fix(host): h2 keepalive on site gRPC listener (arch-review 2026-08-19 P4-3)
This commit is contained in:
@@ -757,21 +757,10 @@ try
|
||||
// metrics listener never collides with the Akka remoting port on site nodes.
|
||||
var metricsPort = configuration.GetValue<int>("ScadaBridge:Node:MetricsPort", 8084);
|
||||
|
||||
// Configure Kestrel for HTTP/2 only on the gRPC port
|
||||
// Configure Kestrel for HTTP/2 only on the gRPC port (plus the h2 keepalive that
|
||||
// makes a half-open inbound stream detectable) — see SiteKestrelSetup.
|
||||
builder.WebHost.ConfigureKestrel(options =>
|
||||
{
|
||||
options.ListenAnyIP(grpcPort, listenOptions =>
|
||||
{
|
||||
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http2;
|
||||
});
|
||||
|
||||
// Dedicated HTTP/1.1 (and HTTP/2) listener for the Prometheus /metrics
|
||||
// scrape endpoint, reachable by an HTTP/1.1 scraper.
|
||||
options.ListenAnyIP(metricsPort, listenOptions =>
|
||||
{
|
||||
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
});
|
||||
SiteKestrelSetup.Configure(options, grpcPort, metricsPort));
|
||||
|
||||
// gRPC server registration. Two interceptors, two disjoint service prefixes, two
|
||||
// separate keys — neither one's absence weakens the other:
|
||||
|
||||
Reference in New Issue
Block a user