Connection 별 자원 비용
각 WebSocket connection 이 소비: file descriptor 1, ~10-50KB memory (read/write buffer + framework metadata + connection 별 state), idle 시 CPU 0, 활성 시 message rate 비례 CPU. 100K connection 한 큰 박스에 fit. 1M 가능하지만 신중. 10M 은 region 별 sharding 또는 managed service 필요.
OS limit 중요
Linux 가 프로세스당 1024 file descriptor default. 안 올리면 한 서버에 1024 WebSocket connection 못 열어. ulimit, limits.conf, sysctl 통해 올림. net.core.somaxconn + tcp_max_syn_backlog 튜닝해서 network 깜빡 후 reconnect storm 처리.
Self-host vs managed: 솔직한 trade-off
Self-host 가 1K connection 엔 쌈, 10M 엔 비쌈. Managed 가 1K 엔 비쌈, 10M 엔 쌈 (팀 안 뽑고 scale + on-call 전문성 얻음). 대부분 앱의 crossover 가 100K-1M 동시 connection 부근. cwkPippa 가 확실히 self-host territory; global SaaS chat 제품은 아닐 수 있어.