big server optimizations

This commit is contained in:
KingKDot
2026-03-09 22:43:33 -05:00
parent 59da5508b2
commit 6b02ea59af
8 changed files with 243 additions and 85 deletions
@@ -27,8 +27,12 @@ export function createWebSocketRuntime<TLifecycleDeps>(deps: {
handleWebSocketMessage: MessageHandler<TLifecycleDeps>;
handleWebSocketClose: CloseHandler<TLifecycleDeps>;
}) {
const wsDeflateEnabled = String(process.env.OVERLORD_WS_PERMESSAGE_DEFLATE || "true")
.trim()
.toLowerCase() !== "false";
return {
perMessageDeflate: true,
perMessageDeflate: wsDeflateEnabled,
maxPayloadLength: Math.max(deps.maxClientPayloadBytes, deps.maxViewerPayloadBytes),
idleTimeout: 255,
sendPings: true,