Skip to content

Commit

Permalink
refactor: thread 10개, hikari 2개
Browse files Browse the repository at this point in the history
  • Loading branch information
minsang-alt committed Nov 19, 2024
1 parent ea0bd98 commit 65e0a64
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@ spring:
file-size-threshold: 0B
enabled: true

hikari:
# 풀 사이즈 설정
maximum-pool-size: 75
minimum-idle: 75

# 시간 관련 설정
max-lifetime: 50000 # 50초, DB wait_timeout보다 작게
connection-timeout: 5000 # 5초, 빠른 응답이 필요한 API
validation-timeout: 1000 # 1초, connection-timeout보다 작게
datasource:
hikari:
# 풀 사이즈 설정
maximum-pool-size: 2
minimum-idle: 2

# 시간 관련 설정
max-lifetime: 50000 # 50초, DB wait_timeout보다 작게
connection-timeout: 5000 # 5초, 빠른 응답이 필요한 API
validation-timeout: 1000 # 1초, connection-timeout보다 작게

# 톰켓 설정
server:
tomcat:
accept-count: 100 # max-connections를 초과하는 요청에 대한 대기열 크기, 대기열이 가득 차면 추가 요청은 거절됨, OS 레벨에서 관리되는 설정
max-connections: 8192 # 서버가 동시에 유지할 수 있는 최대 연결 수, 실제 활성화된 TCP 연결의 수가 아님, 시스템이 할당한 소켓 파일 디스크립터의 수를 의미, 연결이 종료되어도 TIME_WAIT 상태 때문에 파일 디스크립터는 바로 해제되지 않음
threads:
max: 10 # 최대 스레드 수
min-spare: 10 # 초기 스레드 풀 사이즈





springdoc:
swagger-ui:
Expand Down

0 comments on commit 65e0a64

Please sign in to comment.