피드로 돌아가기
Avoiding the Great Treasure Hunt Stall of 2025: What I Learned from Building a Scalable Hytale Server
Dev.toDev.to
Backend

Event Chunking 기반 설계로 Stall Time 10분에서 5초 미만으로 단축

Avoiding the Great Treasure Hunt Stall of 2025: What I Learned from Building a Scalable Hytale Server

Lillian Dube2026년 5월 22일3intermediate

Context

수천 명의 동시 접속자를 처리하는 Event-Driven Architecture 기반 Treasure Hunt 모드 운영 중 Event Bus 정체로 인한 예측 불가능한 지연 및 서버 Stall 발생. Load Balancer를 통한 서버 분산 시도를 진행했으나, 정체된 서버로 트래픽이 유입되는 Server Farm Effect로 인해 근본적인 해결 실패.

Technical Solution

  • 실시간 처리 이벤트 수를 1/10 수준으로 낮추기 위한 Event Chunking 기법 도입으로 처리 효율 극대화
  • Amazon SQS 기반의 Custom Event Queue 구축을 통한 Message-Driven Architecture 전환
  • 메인 서버의 부하를 줄이기 위해 이벤트 처리를 Worker Node로 분리하여 Game Logic과 Player Input 처리 전담 구조 설계
  • 이벤트 패턴 및 발생 빈도 분석을 통한 최적화된 Chunking 전략 수립 및 적용
  • 단순 트래픽 분산이 아닌 부하의 근본 원인인 이벤트 처리 방식의 구조적 변경 추진

이벤트 정체 발생 시 단순 Scale-out보다 이벤트의 성격과 빈도를 분석하여 Batching 또는 Chunking 가능 여부를 먼저 검토하고, 처리 로직을 비동기 Worker Node로 분리하여 메인 루프의 Blocking을 최소화할 것

원문 읽기