ソースを参照

zuul 환경설정 변경

hyojungkim 5 年 前
コミット
e7e15e87b8

zuulgatewayapp/.gitignore → zuulgatewayapp___/.gitignore


zuulgatewayapp/Dockerfile → zuulgatewayapp___/Dockerfile


zuulgatewayapp/bin/main/application.yml → zuulgatewayapp___/bin/main/application.yml


zuulgatewayapp/bin/main/com/idatabank/zuulgatewayapp/zuulgatewayapp/ZuulGatewayApplication.class → zuulgatewayapp___/bin/main/com/idatabank/zuulgatewayapp/zuulgatewayapp/ZuulGatewayApplication.class


zuulgatewayapp/bin/test/com/idatabank/zuulgatewayapp/zuulgatewayapp/ZuulGatewayApplicationTests.class → zuulgatewayapp___/bin/test/com/idatabank/zuulgatewayapp/zuulgatewayapp/ZuulGatewayApplicationTests.class


zuulgatewayapp/build.gradle → zuulgatewayapp___/build.gradle


zuulgatewayapp/gradle/wrapper/gradle-wrapper.jar → zuulgatewayapp___/gradle/wrapper/gradle-wrapper.jar


zuulgatewayapp/gradle/wrapper/gradle-wrapper.properties → zuulgatewayapp___/gradle/wrapper/gradle-wrapper.properties


zuulgatewayapp/gradlew → zuulgatewayapp___/gradlew


zuulgatewayapp/gradlew.bat → zuulgatewayapp___/gradlew.bat


zuulgatewayapp/settings.gradle → zuulgatewayapp___/settings.gradle


zuulgatewayapp/src/main/java/com/idatabank/zuulgatewayapp/zuulgatewayapp/ZuulGatewayApplication.java → zuulgatewayapp___/src/main/java/com/idatabank/zuulgatewayapp/zuulgatewayapp/ZuulGatewayApplication.java


zuulgatewayapp/src/main/resources/application.yml → zuulgatewayapp___/src/main/resources/application.yml


zuulgatewayapp/src/test/java/com/idatabank/zuulgatewayapp/zuulgatewayapp/ZuulGatewayApplicationTests.java → zuulgatewayapp___/src/test/java/com/idatabank/zuulgatewayapp/zuulgatewayapp/ZuulGatewayApplicationTests.java


+ 17 - 4
zuulgatewayserver/bin/main/application.yml

@@ -9,6 +9,7 @@ eureka:
       defaultZone: http://${EUREKA}/eureka
 
 zuul:
+  retryable: true
   ignored-services: "*"
   prefix: /api
   routes:
@@ -31,8 +32,20 @@ ribbon:
 
 icd-search:
   ribbon:
-    NIWSServerListClassName: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
-    ConnectTimeout: 50000
-    ReadTimeout: 50000
     MaxTotalHttpConnections: 500
-    MaxConnectionsPerHost: 100
+    MaxConnectionsPerHost: 100
+
+    # HttpClient의 Connection timeout(연결과정의 Timeout 시간)
+    ConnectTimeout: 3000
+
+    # HttpClient의 Read Timeout(데이터를 읽어오는 과정의 Timeout 시간)
+    ReadTimeout: 5000
+
+    # 첫 시도 실패시 같은 서버로 재시도 하는 수(첫번째 전송은 제외)
+    MaxAutoRetries: 1
+
+    # 첫 시도 실패시 다음 서버로 재시도 하는 수(첫번째 전송은 제외)
+    MaxAutoRetriesNextServer: 1
+
+    #Whether all operations can be retried for this client
+    OkToRetryOnAllOperations: true

+ 17 - 4
zuulgatewayserver/src/main/resources/application.yml

@@ -9,6 +9,7 @@ eureka:
       defaultZone: http://${EUREKA}/eureka
 
 zuul:
+  retryable: true
   ignored-services: "*"
   prefix: /api
   routes:
@@ -31,8 +32,20 @@ ribbon:
 
 icd-search:
   ribbon:
-    NIWSServerListClassName: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
-    ConnectTimeout: 50000
-    ReadTimeout: 50000
     MaxTotalHttpConnections: 500
-    MaxConnectionsPerHost: 100
+    MaxConnectionsPerHost: 100
+
+    # HttpClient의 Connection timeout(연결과정의 Timeout 시간)
+    ConnectTimeout: 3000
+
+    # HttpClient의 Read Timeout(데이터를 읽어오는 과정의 Timeout 시간)
+    ReadTimeout: 5000
+
+    # 첫 시도 실패시 같은 서버로 재시도 하는 수(첫번째 전송은 제외)
+    MaxAutoRetries: 1
+
+    # 첫 시도 실패시 다음 서버로 재시도 하는 수(첫번째 전송은 제외)
+    MaxAutoRetriesNextServer: 1
+
+    #Whether all operations can be retried for this client
+    OkToRetryOnAllOperations: true