느린 요청은 ingress부터 dependency까지 시간 조각으로 분해한다
하나의 요청 시간을 경계별로 쪼개야 handler 코드, DB, 외부 API, 런타임 중 어디서 늦는지 보입니다.
Client
- URL과 payload
- 전체 응답 대기
- status와 retry 여부
Nest
- guard/pipe 검증과 변환
- controller/service 시간
- interceptor timing과 exception
Dependency
- DB query와 pool wait
- 외부 API 왕복
- CPU JSON/crypto와 correlation id
Ingress
- 요청 크기 큼 → access log → payload 제한
DB
- pool wait → query metric → index, batching
Runtime
- loop delay → Clinic → 동기 코드 제거
핵심: 전체 시간을 하나로 보지 말고, 경계별 시간 조각으로 나눈다.