Files
orca/cloud/packages/relay-contract/src/protocol-limits.ts
T
Jinwoo Hong 3eec77c11a chore(cloud): add the relay fence broker, ops console, Terraform root, scripts, and 24 cloud-* workflows (#18413)
Phase 6 of the relay split: the relay's deploy/operate surface moves under cloud/ with 24 cloud-* workflows gated on ORCA_CLOUD_OPERATIONS_ENABLED, the Cloud SQL rollout lease action, the relay Terraform root (dual-accept identities for both repositories), scripts, docs, CODEOWNERS, and a terraform validate job in Cloud Verify.
2026-09-03 06:55:14 -04:00

24 lines
946 B
TypeScript

export const RELAY_PROTOCOL_LIMITS = {
firstFrameDeadlineMs: 2_000,
maxHttpBodyBytes: 4 * 1024,
// Why: the splice is an opaque E2EE stream; the desktop's worktree catalog
// response already exceeds 1MiB on large workspaces (~775KiB at 415
// worktrees, growing), and an oversized frame kills the session on every
// reconnect. 8MiB buys years of headroom; catalog pagination is the
// long-term fix on the desktop side.
maxFrameBytes: 8 * 1024 * 1024,
maxConnectionsPerHost: 8,
idleTimeoutMs: 10 * 60 * 1000,
inviteTtlMs: 10 * 60 * 1000,
inviteMaxAttempts: 5,
inviteReservationLeaseMs: 15 * 1000,
inviteAttemptCooldownMs: 2 * 1000,
hostAttachDeadlineMs: 10 * 1000,
resumeConfirmationDeadlineMs: 30 * 1000,
resumeTtlMs: 30 * 24 * 60 * 60 * 1000,
relayTokenTtlMs: 5 * 60 * 1000,
expiredAuthExistingSpliceGraceMs: 60 * 1000,
controlPingIntervalMs: 15 * 1000,
controlSilenceTimeoutMs: 75 * 1000
} as const