반응형
시간날때 다시 정리할건데 여러분들도 아마 certificate-manager 로 무료 인증서를 발급받은 후
Load Balancer로 타겟그룹을 설정했을것이다.
타겟그룹에서 health check 설정에서 /health를 설정해두었다면
스프링에서 controller로 /health API를 만들어 둬야함. 계속 요청이 들어오면서 통신상태를 확인하는듯 이게 뚫려야 503이 안뜸
package com.ing.sweeety.api.healthCheck;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HealthCheckController {
@GetMapping("/health")
public ResponseEntity<String> healthCheck() {
return ResponseEntity.ok("OK");
}
}
NCP하면서 궁금한거 있으면 개인톡이나 댓글 달면 답변드릴게요
반응형
'DevOps' 카테고리의 다른 글
[운영 SpringBoot 배포]오라클 클라우드 + 톰켓설치 + WAR배포 + SSL인증서 + 도메인연동 (1) | 2025.03.05 |
---|---|
[nGrinder] nGrinder설치 및 성능테스트 부하 테스트 사용법 (spring boot , tomcat) (0) | 2025.03.05 |
[Oracle cloud] 방화벽 허용 / 외부 접속 포트 설정 (0) | 2025.02.26 |
[FileZilla] Putty PPK 파일 이용해서 로그인 하는 방법 (0) | 2025.02.25 |