기존 방식 — 배달 주문 앱

실시간 기능을 위한 구성 요소(주황)가 본체만큼 추가된다

기존 방식 — 배달 주문 앱 실시간 기능을 위한 구성 요소(주황)가 본체만큼 추가된다 클라이언트 앱 · Architecture component 클라이언트 앱 L7 LB / gateway · Architecture component L7 LB / gateway sticky LB · Architecture component sticky LB 앱 서버 A · 주문·조회 처리 · Architecture component 앱 서버 A 주문·조회 처리 앱 서버 B · 주문 #123 배달 상태 변경 · Architecture component 앱 서버 B 주문 #123 배달 상태 변경 WebSocket 서버 ×N · 고객 연결만 보유, 로직 없음 · Architecture component WebSocket 서버 ×N 고객 연결만 보유, 로직 없음 Redis 분산 락 · Architecture component Redis 분산 락 Redis pub/sub · Architecture component Redis pub/sub HTTP (주문·조회) 실시간 연결 배달 상태 방송 구독→push 직렬화

실시간 때문에 붙는 주황 조각들

  • • sticky LB + WebSocket 서버: 고객 연결만 보유(로직 없음)
  • • Redis pub/sub: 고객이 어느 WS인지 몰라 배달 상태 방송 → 구독한 WS가 push
  • • Redis 분산 락: 같은 주문을 여러 서버가 동시 접근 → 직렬화