41장. EKS에서 API와 Worker를 따로 운영한다
API Deployment와 worker Deployment는 같은 code digest를 쓸 수 있지만 command, resource, autoscaling, rollout을 분리한다. API는 request latency, worker는 queue lag와 provider limit로 scale한다. ServiceAccount와 network policy도 최소 권한으로 나눈다. worker에는 public Ingress가 필요 없다.
Deployment에는 digest, security context, request/limit, probes, termination grace, PDB를 둔다. readiness는 필수 configuration과 intake 가능성을 말하고 DB가 잠시 느리다고 liveness가 restart storm을 만들지 않는다. WebSocket은 ALB idle timeout, stickiness 필요성보다 공유 adapter와 reconnect 계약을 먼저 확인한다.
node drain, API pod 삭제, worker pod 삭제, Redis 단절, secret 누락을 주입한다. Running 복구가 아니라 배정 중복 0, queue event 유실 0, WebSocket REST catch-up, alert 전달을 확인한다.