M2 안정성: 부하·장애 주입 테스트 통과 + 재시작 후 시간 초과 몰림 수정

- 2,000 연결 / 500 방 / 초당 248 행동: p95 20ms, p99 37ms, CPU 0.2코어, 메모리 141MB, 오류 0
- 부하 중 SIGKILL→재시작: 2,000 연결 자동 복구, 수 유실 0
- 복구된 방 마감을 30초 + 0~30초 무작위로 분산(몰림으로 p99 336ms → 40ms)
- 보고서: docs/reports/load-20261004.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-04 05:15:06 +09:00
parent f72be633f8
commit aa7f6bffef
5 changed files with 50 additions and 4 deletions

View File

@@ -207,7 +207,9 @@ export class Room {
room.game.state = def.migrate(room.game.state, room.game.stateVersion);
room.game.stateVersion = def.stateVersion;
}
room.game.deadlineFloor = now + 30_000;
// 30s to reconnect, plus up to 30s jitter so thousands of restored rooms don't all time out
// in the same instant (thundering herd after a restart, docs/04 §3).
room.game.deadlineFloor = now + 30_000 + Math.floor(Math.random() * 30_000);
room.scheduleTimer();
}
return room;