/
application.yml
79 lines (73 loc) · 2.2 KB
/
application.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
server:
port: ${PORT:8085}
logging.pattern.console: "%clr(%d{HH:mm:ss.SSS}){blue} %clr(---){faint} %clr([%15.15t]){yellow} %clr(:){red} %clr(%m){faint}%n"
management:
endpoints:
web:
exposure:
include=gateway:
spring:
application:
name: gateway-service
output.ansi.enabled: ALWAYS
cloud:
gateway:
routes:
- id: test-service-withResilient4j
uri: http://localhost:8091
predicates:
- Path=/testService/**
filters:
- RewritePath=/testService/(?<path>.*), /$\{path}
- id: test-service-withResilient4j-statusCode
uri: http://localhost:8091
predicates:
- Path=/testInternalServiceError/**
filters:
- RewritePath=/testInternalServiceError/(?<path>.*), /$\{path}
logging.level.io.github.resilience4j: DEBUG
resilience4j.circuitbreaker:
configs:
default:
slidingWindowSize: 10
minimumNumberOfCalls: 5
permittedNumberOfCallsInHalfOpenState: 3
automaticTransitionFromOpenToHalfOpenEnabled: true
waitDurationInOpenState: 2s
failureRateThreshold: 5
eventConsumerBufferSize: 10
slowCallDurationThreshold: 200ms
slowCallRateThreshold: 30
recordExceptions:
- org.springframework.web.client.HttpServerErrorException
- java.io.IOException
ignoreExceptions:
- java.lang.IllegalStateException
shared:
slidingWindowSize: 100
permittedNumberOfCallsInHalfOpenState: 30
waitDurationInOpenState: 1s
failureRateThreshold: 50
eventConsumerBufferSize: 10
ignoreExceptions:
- java.lang.IllegalStateException
instances:
backendA:
baseConfig: default
backendB:
slidingWindowSize: 10
minimumNumberOfCalls: 10
permittedNumberOfCallsInHalfOpenState: 3
waitDurationInOpenState: 1s
failureRateThreshold: 50
eventConsumerBufferSize: 10
recordFailurePredicate: io.github.romeh.services.gateway.HttpInternalServicePredicate
resilience4j.timelimiter:
time-limiter-aspect-order: 398
configs:
default:
timeoutDuration: 1s
cancelRunningFuture: false
instances:
backendB:
timeoutDuration: 250ms