fix(server): add connection-liveness limits to the shared endpoint

Merged
MA
13h ago
+271-8

Refs PFM-7981

Summary

The single-port endpoint serves HTTP/1.1, gRPC-Web and native gRPC over HTTP/2 (including cleartext h2c) on one net/http listener, which did not configure any of net/http's optional idle/liveness or connection limits. net/http does not close an idle HTTP/2 connection without an explicit IdleTimeout, and ReadHeaderTimeout does not apply on the HTTP/2 path.

This gives the shared listener the same connection hygiene the dedicated gRPC transport already had, on both the control plane and the artifact CAS:

  • IdleTimeout, which net/http also applies to idle HTTP/2 connections
  • HTTP/2 keepalive pings (SendPingTimeout / PingTimeout)
  • MaxConcurrentStreams and MaxReadFrameSize to bound per-connection resources
  • a netutil.LimitListener cap on concurrent connections

No absolute read/write deadline is set, so long-lived gRPC streams and multi-GB CAS uploads and downloads are unaffected.