Skip to content

feat: call 도메인 circuit breaker 적용(path api 실패 환경 가정)#75

Merged
junman95 merged 2 commits intorelease-alphafrom
feature/circuit-breaker
Nov 2, 2023
Merged

feat: call 도메인 circuit breaker 적용(path api 실패 환경 가정)#75
junman95 merged 2 commits intorelease-alphafrom
feature/circuit-breaker

Conversation

@junman95
Copy link
Copy Markdown
Collaborator

Description

서킷 브레이커 적용

Key Changes

  • 요청 3회 이상 지속시 서킷브레이커 적용
  • 60초 후 half-open으로 변경
  • 요청 3회이상 성공시 closed상태로 변경(closed가 서킷 브레이커가 작동 하지 않는 상태임)
  • 서킷 브레이커 용 로거 추가

Issue Reference

  • 로그 형식이 좀 다른데, trace id를 어떻게 추적해야할 지 모르겠음

Checklist

  • Asignee를 본인으로 지정하셨나요?
  • Reviewer를 2명 이상 지정 했나요?
  • 코드의 엣지 케이스에 대해 충분히 고민 하셨나요?
  • conflict가 나지 않는지 확인 하셨나요?

@junman95 junman95 requested review from Ooyd and kimseungbin October 30, 2023 13:50
@junman95 junman95 deployed to development October 30, 2023 13:53 — with GitHub Actions Active
this.config.loggerService.logCircuitBreaker(
`Circuit State: OPEN. Next attempt at: ${new Date(this.nextAttempt)}`,
);
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pseudo

configModule.pathApiSource = configModule.pathApiSource === 'kakao' ? 'naver' : 'kakao'

@junman95 junman95 merged commit 1f306a2 into release-alpha Nov 2, 2023
@junman95 junman95 deleted the feature/circuit-breaker branch November 2, 2023 14:17
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