Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions rush-config/src/main/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions rush-eureka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Eureka 서비스 레지스트리. Spring 서비스들이 여기에 등록되고,

대시보드: http://localhost:8761

- 서비스는 10초마다 하트비트를 보내고, 30초 동안 없으면 5초 주기 정리 작업에서 빠집니다.
- 서비스가 정상 종료하면 바로 등록이 해제됩니다. 응답 없이 죽으면 하트비트 만료와 게이트웨이 목록 갱신(5초)·캐시(5초)를 거쳐 1분 안에 라우팅에서 빠집니다.
- 자기 보존 모드는 로컬에서 꺼 둡니다. 운영에서는 `EUREKA_SELF_PRESERVATION=true`로 켭니다.

## 실행

```bash
Expand Down
5 changes: 4 additions & 1 deletion rush-eureka/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions rush-gateway/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ spring:
config:
import: optional:configserver:${CONFIG_URL:http://localhost:8888}
cloud:
loadbalancer:
cache:
ttl: 5s
gateway:
server:
webflux:
Expand Down
Loading