forked from Loopers-dev-lab/loop-pack-be-l2-vol2-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.yml
More file actions
113 lines (100 loc) · 2.83 KB
/
Copy pathapplication.yml
File metadata and controls
113 lines (100 loc) · 2.83 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
server:
shutdown: graceful
tomcat:
threads:
max: 200 # 최대 워커 스레드 수 (default : 200)
min-spare: 10 # 최소 유지 스레드 수 (default : 10)
connection-timeout: 1m # 연결 타임아웃 (ms) (default : 60000ms = 1m)
max-connections: 8192 # 최대 동시 연결 수 (default : 8192)
accept-count: 100 # 대기 큐 크기 (default : 100)
keep-alive-timeout: 60s # 60s
max-http-request-header-size: 8KB
port: 8084
spring:
main:
web-application-type: servlet
application:
name: commerce-api
profiles:
active: local
config:
import:
- jpa.yml
- kafka.yml
- redis.yml
- logging.yml
- monitoring.yml
kafka:
topic:
product-detail-viewed: product-detail-viewed.v1
product-out-of-stock: product-out-of-stock.v1
payment-completed: payment-completed.v1
springdoc:
use-fqn: true
swagger-ui:
path: /swagger-ui.html
http-client:
pg-simulator:
url: http://localhost:8082
path: /api/v1/payments
pg:
callback:
url: http://localhost:8080/api/v1/payments/callback
retry:
exceptions:
retryable:
- com.loopers.core.domain.error.HttpClientException.ServiceUnavailable
- com.loopers.core.domain.error.HttpClientException.InternalServerError
- com.loopers.core.domain.error.HttpClientException.GatewayTimeout
- com.loopers.core.domain.error.HttpClientException.TooManyRequests
resilience4j:
retry:
instances:
pgRetry:
max-attempts: 3
retry-exceptions:
- com.loopers.core.domain.error.HttpClientException.InternalServerError
- com.loopers.core.domain.error.HttpClientException.ServiceUnavailable
- com.loopers.core.domain.error.HttpClientException.TooManyRequests
fail-after-max-attempts: true
# Exponential Backoff 설정
wait-duration: 1s # 초기 대기 시간
enable-exponential-backoff: true # Exponential Backoff 활성화
exponential-backoff-multiplier: 2 # 배수 (1s → 2s → 4s)
# Jitter 설정
enable-randomized-wait: true # Jitter 활성화
randomized-wait-factor: 0.5 # 0.5 = ±50% 랜덤 범위
retry-aspect-order: 2
circuitbreaker:
instances:
pgCircuitBreaker:
sliding-window-size: 10
failure-rate-threshold: 60
wait-duration-in-open-state: 10s
permitted-number-of-calls-in-half-open-state: 2
slow-call-duration-threshold: 2s
slow-call-rate-threshold: 50
circuit-breaker-aspect-order: 1
---
spring:
config:
activate:
on-profile: local, test
---
spring:
config:
activate:
on-profile: dev
---
spring:
config:
activate:
on-profile: qa
---
spring:
config:
activate:
on-profile: prd
springdoc:
api-docs:
enabled: false