From fe4e801b371f50c4f70a2255e03b751061c0a951 Mon Sep 17 00:00:00 2001 From: jyx-07 Date: Mon, 2 Nov 2026 22:54:37 +0900 Subject: [PATCH] =?UTF-8?q?chore(eureka):=20=EC=84=9C=EB=B9=84=EC=8A=A4=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=EA=B3=BC=20=EC=9E=A5=EC=95=A0=20=EA=B0=90?= =?UTF-8?q?=EC=A7=80=20=EC=A3=BC=EA=B8=B0=20=EA=B8=B0=EB=B3=B8=EA=B0=92=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rush-config/src/main/resources/config/application.yml | 6 ++++++ rush-eureka/README.md | 4 ++++ rush-eureka/src/main/resources/application.yml | 5 ++++- rush-gateway/src/main/resources/application.yml | 3 +++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/rush-config/src/main/resources/config/application.yml b/rush-config/src/main/resources/config/application.yml index 0dd9e46..48f3998 100644 --- a/rush-config/src/main/resources/config/application.yml +++ b/rush-config/src/main/resources/config/application.yml @@ -3,8 +3,14 @@ eureka: client: service-url: defaultZone: ${EUREKA_URL:http://localhost:8761/eureka} + registry-fetch-interval-seconds: 5 + healthcheck: + enabled: true instance: prefer-ip-address: true + instance-id: ${spring.application.name}:${random.uuid} + lease-renewal-interval-in-seconds: 10 + lease-expiration-duration-in-seconds: 30 management: endpoints: diff --git a/rush-eureka/README.md b/rush-eureka/README.md index 341c2db..343e896 100644 --- a/rush-eureka/README.md +++ b/rush-eureka/README.md @@ -4,6 +4,10 @@ Eureka 서비스 레지스트리. Spring 서비스들이 여기에 등록되고, 대시보드: http://localhost:8761 +- 서비스는 10초마다 하트비트를 보내고, 30초 동안 없으면 5초 주기 정리 작업에서 빠집니다. +- 서비스가 정상 종료하면 바로 등록이 해제됩니다. 응답 없이 죽으면 하트비트 만료와 게이트웨이 목록 갱신(5초)·캐시(5초)를 거쳐 1분 안에 라우팅에서 빠집니다. +- 자기 보존 모드는 로컬에서 꺼 둡니다. 운영에서는 `EUREKA_SELF_PRESERVATION=true`로 켭니다. + ## 실행 ```bash diff --git a/rush-eureka/src/main/resources/application.yml b/rush-eureka/src/main/resources/application.yml index 2ac2960..1a68ab0 100644 --- a/rush-eureka/src/main/resources/application.yml +++ b/rush-eureka/src/main/resources/application.yml @@ -11,7 +11,10 @@ eureka: register-with-eureka: false fetch-registry: false server: - enable-self-preservation: false + enable-self-preservation: ${EUREKA_SELF_PRESERVATION:false} + eviction-interval-timer-in-ms: 5000 + response-cache-update-interval-ms: 5000 + wait-time-in-ms-when-sync-empty: 0 management: endpoints: diff --git a/rush-gateway/src/main/resources/application.yml b/rush-gateway/src/main/resources/application.yml index e88a912..66951c8 100644 --- a/rush-gateway/src/main/resources/application.yml +++ b/rush-gateway/src/main/resources/application.yml @@ -7,6 +7,9 @@ spring: config: import: optional:configserver:${CONFIG_URL:http://localhost:8888} cloud: + loadbalancer: + cache: + ttl: 5s gateway: server: webflux: