PR 6.5 — Tune MxGatewayClientOptions defaults
Bumps DefaultCallTimeoutSeconds from 5 → 30. The 5s default was provably unsafe regardless of soak data: a 50k-tag SubscribeBulk walks the gw worker's item list serially under the MxAccess COM apartment lock, and that scan can exceed 5s on a busy node. 30s leaves comfortable headroom for the legitimate worst case while still failing fast on a wedged worker. ConnectTimeoutSeconds (10) and StreamTimeoutSeconds (0 = unlimited) unchanged — the soak harness in PR 6.4 didn't observe pressure on either, so they stay at their original sane values until live data indicates otherwise. Tuning rationale captured as a code comment in GalaxyGatewayOptions so the next reader knows what was deliberate and what's pending live soak data. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,13 +22,22 @@ public sealed record GalaxyDriverOptions(
|
||||
/// through the server-side secret store (DPAPI for production, environment override for
|
||||
/// dev) — the API key never appears in cleartext config.
|
||||
/// </summary>
|
||||
// PR 6.5 tuning notes:
|
||||
// ConnectTimeoutSeconds = 10 — cold-start network path comfort margin; soak runs
|
||||
// never saw a successful connect take >2s, so 10s is generous without being lax.
|
||||
// DefaultCallTimeoutSeconds = 30 — bumped from 5s because a 50k-tag SubscribeBulk
|
||||
// can exceed 5s under MxAccess COM contention (the worker walks the gw item list
|
||||
// serially under the apartment lock). 30s leaves comfortable headroom for the
|
||||
// legitimate worst case while still failing fast on a wedged worker.
|
||||
// StreamTimeoutSeconds = 0 — unlimited; the StreamEvents RPC must run for the
|
||||
// lifetime of the driver. Set a finite value only for diagnostic runs.
|
||||
public sealed record GalaxyGatewayOptions(
|
||||
string Endpoint,
|
||||
string ApiKeySecretRef,
|
||||
bool UseTls = true,
|
||||
string? CaCertificatePath = null,
|
||||
int ConnectTimeoutSeconds = 10,
|
||||
int DefaultCallTimeoutSeconds = 5,
|
||||
int DefaultCallTimeoutSeconds = 30,
|
||||
int StreamTimeoutSeconds = 0);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -54,7 +54,7 @@ public static class GalaxyDriverFactoryExtensions
|
||||
UseTls: dto.Gateway.UseTls ?? true,
|
||||
CaCertificatePath: dto.Gateway.CaCertificatePath,
|
||||
ConnectTimeoutSeconds: dto.Gateway.ConnectTimeoutSeconds ?? 10,
|
||||
DefaultCallTimeoutSeconds: dto.Gateway.DefaultCallTimeoutSeconds ?? 5,
|
||||
DefaultCallTimeoutSeconds: dto.Gateway.DefaultCallTimeoutSeconds ?? 30,
|
||||
StreamTimeoutSeconds: dto.Gateway.StreamTimeoutSeconds ?? 0),
|
||||
MxAccess: new GalaxyMxAccessOptions(
|
||||
ClientName: dto.MxAccess?.ClientName
|
||||
|
||||
Reference in New Issue
Block a user