Skip to content

perf(alerts): 관제 경고의 Neo4j 조회를 동시에 실행한다 - #37

Merged
docodocod merged 1 commit into
mainfrom
dev
Sep 28, 2026
Merged

docodocod merged 1 commit into
mainfrom
dev

Conversation

@docodocod

Copy link
Copy Markdown
Contributor

/alerts·/safety-index 는 대상 화물마다 그래프 조회 6개를 순차로 돌려, 운영(Aura)에서 354회·2분 이상 걸렸고 nginx 60초 제한에 걸려 504 가 났다(docs/31).

  • _segregation_alerts·_adjacent_berth_alerts: 조회 대상을 먼저 모으고 Neo4j 조회는 동시 8개로 실행, 판정은 원래 순서대로 한다
  • graph_queries·판정 함수는 그대로 — /safety/assess·챗봇·에이전트 도구는 영향 없음
  • 운영 Aura 실측: build_berth_alerts 약 146초 → 48초(첫 실행), 판정 조회 41초·인접 7초
  • 회귀 테스트: 동시 1개(순차)와 8개의 경고 내용·순서가 같다

/alerts·/safety-index 는 대상 화물마다 그래프 조회 6개를 순차로 돌려, 운영(Aura)에서
354회·2분 이상 걸렸고 nginx 60초 제한에 걸려 504 가 났다(docs/31).

- _segregation_alerts·_adjacent_berth_alerts: 조회 대상을 먼저 모으고 Neo4j 조회는
  동시 8개로 실행, 판정은 원래 순서대로 한다
- graph_queries·판정 함수는 그대로 — /safety/assess·챗봇·에이전트 도구는 영향 없음
- 운영 Aura 실측: build_berth_alerts 약 146초 → 48초(첫 실행), 판정 조회 41초·인접 7초
- 회귀 테스트: 동시 1개(순차)와 8개의 경고 내용·순서가 같다

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@docodocod
docodocod merged commit 6e3df84 into main Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant