LRA Coordinator 설정 속성
LRA Coordinator의 주요 속성은 다음과 같다.
속성명 | 설명 | 비고 |
---|---|---|
spring.datasource.url |
LRA Coordinator의 DB 접속 URL |
Default로는 ${ACTION_STORE_URL}으로 정의되어 있다. |
spring.datasource.username |
LRA Coordinator의 DB 접속 사용자명 |
Default로는 ${ACTION_STORE_USERNAME}으로 정의되어 있다. |
spring.datasource.password |
LRA Coordinator의 DB 접속 비밀번호 |
Default로는 ${ACTION_STORE_PASSWORD}으로 정의되어 있다. |
속성명 | 설명 | 비고 |
---|---|---|
lra.coordinator.uri |
LRA Coordinator의 접속 URL 정보 |
|
lra.max-timelimit |
LRA 트랜잭션 Timeout |
LRA Annotation에 Timeout이 설정되지 않을 경우 Default로 설정되는 Timeout 값이며, Annotation Timeout이 설정되어 있다면 Coordinator에 설정된 값과 비교하여 가장 작은 값을 Timeout으로 설정한다. |
속성명 | 설명 | 비고 |
---|---|---|
lra.recovery.periodic-recovery-period |
LRA 리커버리 주기 |
보상 트래잭션이 실패한 대상에 대해 다시 재처리를 시도하는 주기를 의미한다. 사이트 환경(트랜잭션 처리량, 시스템 리소스 등)에 따라 적절하게 정의되어야 한다. 참고로, 재시도 간격이 너무 짧으면 시스템 부하가 발생할 수 있으며, 너무 길면 장애 복구에 소요되는 시간이 지연될 수 있다. |
lra.recovery.recovery-backoff-period |
LRA 리커버리 재시도 간격 주기 |
보상 트래잭션이 실패한 대상에 대해서 재처리 시도 후, 다시 재시도 시의 간격을 의미한다. |
lra.recovery.periodic-recovery-initialization-offset |
LRA의 주기적인 복구 작업이 시작되기 전에 대기하는 초기 오프셋 |
해당 설정은 시스템의 부하를 분산시키기 위해 여러 LRA를 복구 작업을 동시에 시작하지 않고, 서로 다른 시간에 시작하도록 하는데 사용한다. |
lra.recovery.recovery-try-max-count |
LRA 리커버리 최대 횟수 |
설정 된 횟수 만큼 보상 트랜잭션이 완료가 되지 않으면 리커버리 테이블에 백업한다. |
기본적으로, LRA Coordinator bootJar의 application.yml 파일에는 다음과 같이 설정되어 있다.
spring:
main:
banner-mode: "off"
cloud:
bootstrap:
enabled: true
config:
enabled: false
kubernetes:
discovery:
all-namespaces: true
sleuth:
enabled: true
web:
enabled: true
log:
slf4j:
enabled: true
messages:
basename: classpath:/i18n/messages
encoding: UTF-8
datasource:
url: ${ACTION_STORE_URL}
username: ${ACTION_STORE_USERNAME}
password: ${ACTION_STORE_PASSWORD}
server:
port: 8082
error:
include-exception: false
include-stacktrace: on-param
max-http-header-size: 100000
lra:
coordinator:
uri: http://bxframework-lra-coordinator
max-timelimit: 30M
recovery:
periodic-recovery-period: 120
recovery-backoff-period: 10
periodic-recovery-initialization-offset: 0
recovery-try-max-count: 3
management:
endpoints:
web:
exposure:
include: "*"
logging:
level:
root: info
org.apache.http: info
org.apache.tomcat: info
org.apache.catalina: info
org.apache.coyote: info
jdk.event.security: warn
com.arjuna.ats.arjuna: info
pattern:
console: "%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint}
%clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint}
%clr(%-40.40logger{39}){cyan} %clr(:){faint}
%m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}}"
file: "%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}
${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} :
%m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}}"