Skip to content

Commit

Permalink
✨ feat: typeorm 설정 수정 (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanggwangseong committed Jan 4, 2025
1 parent e9b65b2 commit 3334cf7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
5 changes: 0 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ services:
backend:
image: ${NCP_CONTAINER_REGISTRY}/backend:latest
container_name: backend_prod
network_mode: host
ports:
- "${BACKEND_OUTBOUND_PORT}:${BACKEND_INBOUND_PORT}"
environment:
Expand All @@ -29,8 +28,6 @@ services:
- N_REGION=${N_REGION}
- N_BUCKET_NAME=${N_BUCKET_NAME}
- N_BUCKET_URL=${N_BUCKET_URL}
extra_hosts:
- "host.docker.internal:host-gateway"


backend-flame:
Expand Down Expand Up @@ -61,8 +58,6 @@ services:
- N_REGION=${N_REGION}
- N_BUCKET_NAME=${N_BUCKET_NAME}
- N_BUCKET_URL=${N_BUCKET_URL}
extra_hosts:
- "host.docker.internal:host-gateway"

mysql-prod:
image: mysql:8.0
Expand Down
11 changes: 6 additions & 5 deletions k6/scripts/participations-performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ export const options = {
scenarios: {
ramp_up_test: {
executor: "ramping-arrival-rate",
startRate: 50, // 초당 50 요청으로 시작
startRate: 50,
timeUnit: "1s",
stages: [
{ target: 300, duration: "1m" }, // 1분 동안 50 → 300 RPS 증가
{ target: 700, duration: "2m" }, // 2분 동안 300 → 700 RPS 증가
{ target: 200, duration: "2m" },
{ target: 500, duration: "3m" },
{ target: 700, duration: "5m" },
],
preAllocatedVUs: 1200, // VUs 증가
maxVUs: 1600, // 최대 VUs 증가
preAllocatedVUs: 1500,
maxVUs: 2000,
},
},
// 태그 추가
Expand Down
4 changes: 2 additions & 2 deletions src/common/typeorm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const TypeOrmModuleOptions = {
keepAliveInitialDelay: 10000, // Keep-Alive 딜레이
enableKeepAlive: true,
extra: {
connectionLimit: 300, // MySQL max_connections의 50%로 설정 이전에 500
queueLimit: 1500, // 대기열 크기를 조정 이전에 2000
connectionLimit: 200, // MySQL max_connections의 약 20%
queueLimit: 500, // 대기열 크기를 줄여 불필요한 대기 요청 방지
waitForConnections: true,
connectTimeout: 30000, // 연결 타임아웃
acquireTimeout: 30000, // 풀에서 커넥션 획득 타임아웃
Expand Down

0 comments on commit 3334cf7

Please sign in to comment.