From b56e54696ce6842bee2f5601f271cc2cb4e32ae7 Mon Sep 17 00:00:00 2001 From: assu10 Date: Sun, 6 Dec 2020 00:25:45 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=A0=EB=A0=88=EC=B9=B4=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yaml | 17 ++++++--- .../src/main/resources/application-peer1.yaml | 31 ++++++++-------- .../src/main/resources/application-peer2.yaml | 23 ++++++------ .../src/main/resources/application.yaml | 6 +++- .../src/main/resources/application.yaml | 19 ++++++---- .../src/main/resources/application.yaml | 19 ++++++---- .../src/main/resources/application.yaml | 36 ++++++++++++++----- 7 files changed, 94 insertions(+), 57 deletions(-) diff --git a/auth-service/src/main/resources/application.yaml b/auth-service/src/main/resources/application.yaml index 021737a..a4e808d 100644 --- a/auth-service/src/main/resources/application.yaml +++ b/auth-service/src/main/resources/application.yaml @@ -15,15 +15,22 @@ management: endpoint: shutdown: enabled: true + eureka: - instance: - prefer-ip-address: true # 서비스 이름 대신 IP 주소 등록 client: - register-with-eureka: true # 유레카 서버에 서비스 등록 - fetch-registry: true # 레지스트리 정보를 로컬에 캐싱 - registry-fetch-interval-seconds: 3 # 서비스 목록을 3초마다 캐싱 + register-with-eureka: true # 레지스트리에 자신을 등록할지에 대한 여부 (디폴트 true) + fetch-registry: true # 레지스트리에 있는 정보를 가져올지에 대한 여부 (디폴트 true) + registry-fetch-interval-seconds: 30 # 서비스 목록을 설정한 시간마다 캐싱 (디폴트 30초) + disable-delta: true # 캐싱 시 변경된 부분만 업데이트할 지 여부 (디폴트 false) serviceUrl: defaultZone: http://peer1:8762/eureka/ + instance: + lease-renewal-interval-in-seconds: 10 # 유레카 서버로 설정된 시간(second)마다 하트비트 전송 (디폴트 30초) + # 디스커버리는 서비스 등록 해제 하기 전에 마지막 하트비트에서부터 설정된 시간(second) 동안 하트비트가 수신되지 않으면 + # 서비스 등록 해제 (디폴트 90초) + lease-expiration-duration-in-seconds: 15 + prefer-ip-address: true # 서비스의 호스트 이름이 아닌 IP 주소를 유레카 서버에 등록하도록 지정 (디폴트 false) + logging: level: com.netflix: WARN diff --git a/eurekaserver/src/main/resources/application-peer1.yaml b/eurekaserver/src/main/resources/application-peer1.yaml index 4ad9774..cd51da7 100644 --- a/eurekaserver/src/main/resources/application-peer1.yaml +++ b/eurekaserver/src/main/resources/application-peer1.yaml @@ -19,25 +19,22 @@ management: endpoint: shutdown: enabled: true -eureka: - # instance: - # hostname: peer1 - # metadataMap: - # instanceId: peer1_${spring.application.name}:${spring.application.instance_id:${random.value}} - client: - register-with-eureka: false # 유레카 서비스에 (자신을) 등록하지 않는다. (클러스터 모드가 아니므로) -> false 로 해도 피어링이 된다. - fetch-registry: false # 레지스트리 정보를 로컬에 캐싱하지 않는다. (클러스터 모드가 아니므로) - serviceUrl: - defaultZone: http://peer1:8762/eureka/ #http://peer1:8762/eureka/ -# defaultZone: http://peer2:8763/eureka/ #http://peer1:8762/eureka/ - #server: - #wait-time-in-ms-when-sync-empty: 5 # 서버가 요청을 받기 전 대기할 초기 시간 (5ms, 운영 환경에선 삭제 필요) - # 일시적인 네트워크 장애로 인한 서비스 해제 막기 위한 보호모드 해제 (디폴트 60초, 운영에선 삭제 필요) - # 원래는 해당 시간안에 하트비트가 일정 횟수 이상 들어오지 않아야 서비스 해제하는데 false 설정 시 하트비트 들어오지 않으면 바로 서비스 제거 - #enable-self-preservation: false +eureka: + server: + enable-self-preservation: false # 일시적인 네트워크 장애로 인한 서비스 해제 막기 위한 자기 보호 모드 (디폴트 true, 운영에선 반드시 true 로 설정 필요) + response-cache-update-interval-ms: 30000 # 유레카 서버의 캐싱 업데이트 주기 (디폴트 30,000ms) + eviction-interval-timer-in-ms: 15000 # 클라이언트로부터 하트비트가 계속 수신 되는지 점검 (디폴트 60,000) + wait-time-in-ms-when-sync-empty: 3000 # 유레카 서버가 시작되고 유레카 피어링 노드로부터 Instance 들을 가져올 수 없을 때 기다릴 시간 (디폴트 3000ms, 운영 환경에선 삭제 필요) + registry-sync-retries: 5 # 유레카 피어 노드로부터 registry 를 갱신할 수 없을 때 재시도 횟수 (디폴트 5) + client: + register-with-eureka: false + fetch-registry: false + serviceUrl: + defaultZone: http://peer2:8763/eureka/ + logging: level: - com.netflix: WARN + com.netflix: DEBUG org.springframework.web: WARN com.assu.cloud: DEBUG diff --git a/eurekaserver/src/main/resources/application-peer2.yaml b/eurekaserver/src/main/resources/application-peer2.yaml index 4232c45..ec23ea9 100644 --- a/eurekaserver/src/main/resources/application-peer2.yaml +++ b/eurekaserver/src/main/resources/application-peer2.yaml @@ -19,21 +19,20 @@ management: endpoint: shutdown: enabled: true + eureka: -# instance: -# hostname: peer2 -# metadataMap: -# instanceId: peer2_${spring.application.name}:${spring.application.instance_id:${random.value}} + server: + enable-self-preservation: false # 일시적인 네트워크 장애로 인한 서비스 해제 막기 위한 자기 보호 모드 (디폴트 true, 운영에선 반드시 true 로 설정 필요) + response-cache-update-interval-ms: 30000 # 유레카 서버의 캐싱 업데이트 주기 (디폴트 30,000ms) + eviction-interval-timer-in-ms: 15000 # 클라이언트로부터 하트비트가 계속 수신 되는지 점검 (디폴트 60,000) + wait-time-in-ms-when-sync-empty: 3000 # 유레카 서버가 시작되고 유레카 피어링 노드로부터 Instance 들을 가져올 수 없을 때 기다릴 시간 (디폴트 3000ms, 운영 환경에선 삭제 필요) + registry-sync-retries: 5 # 유레카 피어 노드로부터 registry 를 갱신할 수 없을 때 재시도 횟수 (디폴트 5) client: - register-with-eureka: false # 유레카 서비스에 (자신을) 등록하지 않는다. (클러스터 모드가 아니므로) - fetch-registry: false # 레지스트리 정보를 로컬에 캐싱하지 않는다. (클러스터 모드가 아니므로) + register-with-eureka: false + fetch-registry: false serviceUrl: - defaultZone: http://peer1:8762/eureka/ # http://peer2:8763/eureka/ #,http://peer1:8762/eureka/ - #server: - #wait-time-in-ms-when-sync-empty: 5 # 서버가 요청을 받기 전 대기할 초기 시간 (5ms, 운영 환경에선 삭제 필요) - # 일시적인 네트워크 장애로 인한 서비스 해제 막기 위한 보호모드 해제 (디폴트 60초, 운영에선 삭제 필요) - # 원래는 해당 시간안에 하트비트가 일정 횟수 이상 들어오지 않아야 서비스 해제하는데 false 설정 시 하트비트 들어오지 않으면 바로 서비스 제거 - #enable-self-preservation: false + defaultZone: http://peer1:8762/eureka/ + logging: level: com.netflix: WARN diff --git a/eurekaserver/src/main/resources/application.yaml b/eurekaserver/src/main/resources/application.yaml index e887b19..5e7df4c 100644 --- a/eurekaserver/src/main/resources/application.yaml +++ b/eurekaserver/src/main/resources/application.yaml @@ -1,3 +1,7 @@ spring: profiles: - active: peer1 \ No newline at end of file + active: peer1 +# cloud: +# inetutils: +# ignored-interfaces: eth1* # 해당 인터페이스 무시 +# preferred-networks: 192.168 # 선호하는 IP 주소 설정 \ No newline at end of file diff --git a/event-service/src/main/resources/application.yaml b/event-service/src/main/resources/application.yaml index 2ec240a..58c8034 100644 --- a/event-service/src/main/resources/application.yaml +++ b/event-service/src/main/resources/application.yaml @@ -31,17 +31,22 @@ management: endpoint: shutdown: enabled: true + eureka: - instance: - prefer-ip-address: true # 서비스 이름 대신 IP 주소 등록 - lease-renewal-interval-in-seconds: 3 # 디스커버리한테 1초마다 하트비트 전송 (디폴트 30초) - lease-expiration-duration-in-seconds: 2 # 디스커버리는 서비스 등록 해제 하기 전에 마지막 하트비트에서부터 2초 기다림 (디폴트 90초) client: - register-with-eureka: true # 유레카 서버에 서비스 등록 - fetch-registry: true # 레지스트리 정보를 로컬에 캐싱 + register-with-eureka: true # 레지스트리에 자신을 등록할지에 대한 여부 (디폴트 true) + fetch-registry: true # 레지스트리에 있는 정보를 가져올지에 대한 여부 (디폴트 true) + registry-fetch-interval-seconds: 30 # 서비스 목록을 설정한 시간마다 캐싱 (디폴트 30초) + disable-delta: true # 캐싱 시 변경된 부분만 업데이트할 지 여부 (디폴트 false) serviceUrl: defaultZone: http://peer1:8762/eureka/ - registry-fetch-interval-seconds: 3 # 서비스 목록을 3초마다 캐싱 + instance: + lease-renewal-interval-in-seconds: 10 # 유레카 서버로 설정된 시간(second)마다 하트비트 전송 (디폴트 30초) + # 디스커버리는 서비스 등록 해제 하기 전에 마지막 하트비트에서부터 설정된 시간(second) 동안 하트비트가 수신되지 않으면 + # 서비스 등록 해제 (디폴트 90초) + lease-expiration-duration-in-seconds: 15 + prefer-ip-address: true # 서비스의 호스트 이름이 아닌 IP 주소를 유레카 서버에 등록하도록 지정 (디폴트 false) + logging: level: com.netflix: WARN diff --git a/member-service/src/main/resources/application.yaml b/member-service/src/main/resources/application.yaml index 2e9ad4d..46b83c5 100644 --- a/member-service/src/main/resources/application.yaml +++ b/member-service/src/main/resources/application.yaml @@ -30,17 +30,22 @@ management: endpoint: shutdown: enabled: true + eureka: - instance: - prefer-ip-address: true # 서비스 이름 대신 IP 주소 등록 - lease-renewal-interval-in-seconds: 3 # 디스커버리한테 1초마다 하트비트 전송 (디폴트 30초) - lease-expiration-duration-in-seconds: 2 # 디스커버리는 서비스 등록 해제 하기 전에 마지막 하트비트에서부터 2초 기다림 (디폴트 90초) client: - register-with-eureka: true # 유레카 서버에 서비스 등록 - fetch-registry: true # 레지스트리 정보를 로컬에 캐싱 + register-with-eureka: true # 레지스트리에 자신을 등록할지에 대한 여부 (디폴트 true) + fetch-registry: true # 레지스트리에 있는 정보를 가져올지에 대한 여부 (디폴트 true) + registry-fetch-interval-seconds: 30 # 서비스 목록을 설정한 시간마다 캐싱 (디폴트 30초) + disable-delta: true # 캐싱 시 변경된 부분만 업데이트할 지 여부 (디폴트 false) serviceUrl: defaultZone: http://peer1:8762/eureka/ - registry-fetch-interval-seconds: 3 # 서비스 목록을 3초마다 캐싱 + instance: + lease-renewal-interval-in-seconds: 10 # 유레카 서버로 설정된 시간(second)마다 하트비트 전송 (디폴트 30초) + # 디스커버리는 서비스 등록 해제 하기 전에 마지막 하트비트에서부터 설정된 시간(second) 동안 하트비트가 수신되지 않으면 + # 서비스 등록 해제 (디폴트 90초) + lease-expiration-duration-in-seconds: 15 + prefer-ip-address: true # 서비스의 호스트 이름이 아닌 IP 주소를 유레카 서버에 등록하도록 지정 (디폴트 false) + logging: level: com.netflix: WARN diff --git a/zuulserver/src/main/resources/application.yaml b/zuulserver/src/main/resources/application.yaml index 0dadcb7..c352782 100644 --- a/zuulserver/src/main/resources/application.yaml +++ b/zuulserver/src/main/resources/application.yaml @@ -3,6 +3,7 @@ spring: name: zuulserver # 서비스 ID (컨피그 클라이언트가 어떤 서비스를 조회하는지 매핑) profiles: active: default # 서비스가 실행할 기본 프로파일 + server: port: 5555 your.name: "ZUUL DEFAULT" @@ -20,17 +21,36 @@ management: endpoint: shutdown: enabled: true + eureka: - instance: - prefer-ip-address: true # 서비스 이름 대신 IP 주소 등록 - lease-renewal-interval-in-seconds: 3 # 디스커버리한테 1초마다 하트비트 전송 (디폴트 30초) - lease-expiration-duration-in-seconds: 2 # 디스커버리는 서비스 등록 해제 하기 전에 마지막 하트비트에서부터 2초 기다림 (디폴트 90초) client: - register-with-eureka: true # 유레카 서버에 서비스 등록 - fetch-registry: true # 레지스트리 정보를 로컬에 캐싱 + register-with-eureka: true # 레지스트리에 자신을 등록할지에 대한 여부 (디폴트 true) + fetch-registry: true # 레지스트리에 있는 정보를 가져올지에 대한 여부 (디폴트 true) + registry-fetch-interval-seconds: 30 # 서비스 목록을 설정한 시간마다 캐싱 (디폴트 30초) + disable-delta: true # 캐싱 시 변경된 부분만 업데이트할 지 여부 (디폴트 false) serviceUrl: defaultZone: http://peer1:8762/eureka/ - registry-fetch-interval-seconds: 3 # 서비스 목록을 3초마다 캐싱 + instance: + lease-renewal-interval-in-seconds: 10 # 유레카 서버로 설정된 시간(second)마다 하트비트 전송 (디폴트 30초) + # 디스커버리는 서비스 등록 해제 하기 전에 마지막 하트비트에서부터 설정된 시간(second) 동안 하트비트가 수신되지 않으면 + # 서비스 등록 해제 (디폴트 90초) + lease-expiration-duration-in-seconds: 15 + prefer-ip-address: true # 서비스의 호스트 이름이 아닌 IP 주소를 유레카 서버에 등록하도록 지정 (디폴트 false) + + +#eureka: +# instance: +# prefer-ip-address: true +# lease-renewal-interval-in-seconds: 3 +# lease-expiration-duration-in-seconds: 2 +# client: +# register-with-eureka: true # 레지스트리에 자신을 등록할지에 대한 여부 (디폴트 true) +# fetch-registry: true # 레지스트리에 있는 정보를 가져올지에 대한 여부 (디폴트 true) +# registry-fetch-interval-seconds: 3 +# disable-delta: true +# serviceUrl: +# defaultZone: http://peer1:8762/eureka/ + zuul: ignored-services: '*' # 유레카 기반 모든 경로 제외 prefix: /api # 정의한 모든 서비스에 /api 접두어 @@ -50,7 +70,7 @@ event-service: ReadTimeout: 5000 # 리본 타임아웃 5초로 설정 (기본 5초) logging: level: - com.netflix: WARN + com.netflix: DEBUG org.springframework.web: WARN com.assu.cloud: DEBUG signing: