유레카 피어링 최종

This commit is contained in:
assu10
2020-10-24 20:11:32 +09:00
parent c09b454c22
commit c4746083c6
3 changed files with 11 additions and 17 deletions

View File

@@ -20,17 +20,17 @@ management:
shutdown:
enabled: true
eureka:
# instance:
# hostname: peer1
# metadataMap:
# instanceId: peer1_${spring.application.name}:${spring.application.instance_id:${random.value}}
# instance:
# hostname: peer1
# metadataMap:
# instanceId: peer1_${spring.application.name}:${spring.application.instance_id:${random.value}}
client:
register-with-eureka: true # 유레카 서비스에 (자신을) 등록하지 않는다. (클러스터 모드가 아니므로)
fetch-registry: true # 레지스트리 정보를 로컬에 캐싱하지 않는다. (클러스터 모드가 아니므로)
register-with-eureka: false # 유레카 서비스에 (자신을) 등록하지 않는다. (클러스터 모드가 아니므로) -> false 로 해도 피어링이 된다.
fetch-registry: false # 레지스트리 정보를 로컬에 캐싱하지 않는다. (클러스터 모드가 아니므로)
serviceUrl:
defaultZone: http://peer1:8762/eureka/,http://peer2:8763/eureka/
defaultZone: http://peer2:8763/eureka/ #http://peer1:8762/eureka/
#server:
#server:
#wait-time-in-ms-when-sync-empty: 5 # 서버가 요청을 받기 전 대기할 초기 시간 (5ms, 운영 환경에선 삭제 필요)
# 일시적인 네트워크 장애로 인한 서비스 해제 막기 위한 보호모드 해제 (디폴트 60초, 운영에선 삭제 필요)
# 원래는 해당 시간안에 하트비트가 일정 횟수 이상 들어오지 않아야 서비스 해제하는데 false 설정 시 하트비트 들어오지 않으면 바로 서비스 제거

View File

@@ -25,10 +25,10 @@ eureka:
# metadataMap:
# instanceId: peer2_${spring.application.name}:${spring.application.instance_id:${random.value}}
client:
register-with-eureka: true # 유레카 서비스에 (자신을) 등록하지 않는다. (클러스터 모드가 아니므로)
fetch-registry: true # 레지스트리 정보를 로컬에 캐싱하지 않는다. (클러스터 모드가 아니므로)
register-with-eureka: false # 유레카 서비스에 (자신을) 등록하지 않는다. (클러스터 모드가 아니므로)
fetch-registry: false # 레지스트리 정보를 로컬에 캐싱하지 않는다. (클러스터 모드가 아니므로)
serviceUrl:
defaultZone: http://peer2:8763/eureka/,http://peer1:8762/eureka/
defaultZone: http://peer1:8762/eureka/ # http://peer2:8763/eureka/ #,http://peer1:8762/eureka/
#server:
#wait-time-in-ms-when-sync-empty: 5 # 서버가 요청을 받기 전 대기할 초기 시간 (5ms, 운영 환경에선 삭제 필요)
# 일시적인 네트워크 장애로 인한 서비스 해제 막기 위한 보호모드 해제 (디폴트 60초, 운영에선 삭제 필요)

View File

@@ -1,6 +0,0 @@
#spring:
# application:
# name: eurekaserver # 서비스 ID (컨피그 클라이언트가 어떤 서비스를 조회하는지 매핑)
# cloud:
# config:
# uri: http://localhost:8889 # 컨피그 서버 위치