Преглед на файлове

써킷브레이커 설정 변경

hyojungkim преди 5 години
родител
ревизия
726e2b9152

+ 1 - 1
apigateway/bin/main/application.yml

@@ -51,4 +51,4 @@ logging:
     com.idatabank.springgateway: DEBUG
     reactor.netty.http.server.AccessLog: INFO
 
-#docker run --rm -p 8080:8080 -e EUREKA=192.168.99.100:8761 --name gateway --network api_bridge spring-cloud-gateway
+#docker run --rm -p 8080:8080 -e EUREKA=192.168.99.100:8761 --name gateway spring-cloud-gateway

BIN
apigateway/bin/main/com/idatabank/scg/apigateway/Resilience4jConfig.class


+ 3 - 0
apigateway/build.gradle

@@ -25,6 +25,9 @@ dependencies {
 	implementation 'org.springframework.cloud:spring-cloud-starter-netflix-hystrix'
 	implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j'
 
+	implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
+	implementation 'org.springframework.cloud:spring-cloud-starter-zipkin'
+
 	testImplementation('org.springframework.boot:spring-boot-starter-test') {
 		exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
 	}

+ 1 - 1
apigateway/src/main/java/com/idatabank/scg/apigateway/Resilience4jConfig.java

@@ -17,7 +17,7 @@ public class Resilience4jConfig {
     CircuitBreakerConfig circuitBreakerConfig = CircuitBreakerConfig.custom().failureRateThreshold(20) //
         .permittedNumberOfCallsInHalfOpenState(5) // half open 상태일 때 요청 수
         .slidingWindowSize(100) //
-        .minimumNumberOfCalls(10) //
+        .minimumNumberOfCalls(50) //
         .waitDurationInOpenState(Duration.ofMillis(20000)).build(); // circuit open 상태를 얼마나 지속할지 설정
     return factory -> factory
         .configureDefault(id -> new Resilience4JConfigBuilder(id).circuitBreakerConfig(circuitBreakerConfig).build());

+ 1 - 1
apigateway/src/main/resources/application.yml

@@ -51,4 +51,4 @@ logging:
     com.idatabank.springgateway: DEBUG
     reactor.netty.http.server.AccessLog: INFO
 
-#docker run --rm -p 8080:8080 -e EUREKA=192.168.99.100:8761 --name gateway --network api_bridge spring-cloud-gateway
+#docker run --rm -p 8080:8080 -e EUREKA=192.168.99.100:8761 --name gateway spring-cloud-gateway

+ 1 - 1
eurekaserver/bin/main/application.yml

@@ -8,4 +8,4 @@ eureka:
 server:
   port: 8761
 
-#docker run --rm -p 8761:8761 --name eureka --network api_bridge eureka-server:gateway
+#docker run --rm -p 8761:8761 --name eureka eureka-server:gateway

+ 1 - 1
eurekaserver/src/main/resources/application.yml

@@ -8,4 +8,4 @@ eureka:
 server:
   port: 8761
 
-#docker run --rm -p 8761:8761 --name eureka --network api_bridge eureka-server:gateway
+#docker run --rm -p 8761:8761 --name eureka eureka-server:gateway