Skip to content

Commit

Permalink
feat: 커넥션풀 사이즈 환경변수를 복제 서버 DB에 맞게 나눈다. (#611)
Browse files Browse the repository at this point in the history
* feat: source와 replica connection-pool 사이즈를 설정한다.

* feat: deploy 스레드 사이즈를 설정한다.
  • Loading branch information
asebn1 authored Oct 20, 2022
1 parent 23ea1cc commit 7fa53e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions backend/src/main/resources/application-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ spring:
password: ${SOURCE_MYSQL_PASSWORD}
username: ${SOURCE_MYSQL_USERNAME}
driver-class-name: com.mysql.cj.jdbc.Driver
maximum-pool-size: ${SOURCE_MAX_CONNECTION_POOL_SIZE}
replica:
hikari:
jdbc-url: ${REPLICA_MYSQL_URL}
password: ${REPLICA_MYSQL_PASSWORD}
username: ${REPLICA_MYSQL_USERNAME}
driver-class-name: com.mysql.cj.jdbc.Driver
maximum-pool-size: ${REPLICA_MAX_CONNECTION_POOL_SIZE}
redis:
host: ${REDIS_HOST}
port: ${REDIS_PORT}
Expand Down Expand Up @@ -50,5 +52,12 @@ google:
client-id: ${GOOGLE_CLIENT_ID}
client-secret: ${GOOGLE_CLIENT_SECRET}

server:
tomcat:
accept-count: ${TOMCAT_ACCEPT_COUNT}
threads:
max: ${MAX_THREAD_POOL_SIZE}
max-connections: ${TOMCAT_MAX_CONNENCTIONS}

logging:
config: classpath:log4j2-deploy.yml
4 changes: 2 additions & 2 deletions backend/src/main/resources/application-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ spring:
password: ${SOURCE_MYSQL_PASSWORD}
username: ${SOURCE_MYSQL_USERNAME}
driver-class-name: com.mysql.cj.jdbc.Driver
maximum-pool-size: ${MAX_CONNECTION_POOL_SIZE}
maximum-pool-size: ${SOURCE_MAX_CONNECTION_POOL_SIZE}
replica:
hikari:
jdbc-url: ${REPLICA_MYSQL_URL}
password: ${REPLICA_MYSQL_PASSWORD}
username: ${REPLICA_MYSQL_USERNAME}
driver-class-name: com.mysql.cj.jdbc.Driver
maximum-pool-size: ${MAX_CONNECTION_POOL_SIZE}
maximum-pool-size: ${REPLICA_MAX_CONNECTION_POOL_SIZE}
redis:
host: ${REDIS_HOST}
port: ${REDIS_PORT}
Expand Down

0 comments on commit 7fa53e8

Please sign in to comment.