Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ spring:
main:
web-application-type: servlet

task:
scheduling:
pool:
size: 10 # 각 스케줄러가 독립 스레드 사용
Comment on lines +5 to +8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

스케줄러 풀 크기를 확장하여 여러 작업이 병렬로 실행될 수 있도록 개선되었습니다. 이때 thread-name-prefix 설정을 함께 추가하면, 로그에서 스케줄러 스레드를 명확히 구분할 수 있어 운영 및 디버깅 시 유리합니다.

  task:
    scheduling:
      pool:
        size: 10 # 각 스케줄러가 독립 스레드 사용
      thread-name-prefix: scheduling-


datasource:
url: ${DATABASE_URL}
username: ${DATABASE_USERNAME}
Expand Down Expand Up @@ -56,8 +61,8 @@ spring:
host: ${REDIS_HOST:localhost}
port: 6379
password: ${REDIS_PASSWORD}
connect-timeout: 30s
timeout: 30s
connect-timeout: 3s
timeout: 3s
Comment on lines +64 to +65

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Redis 안정성을 위해 타임아웃을 단축한 것은 좋은 방향입니다. 다만, 시스템 안정성을 위해 다음 두 가지 사항을 추가로 검토해 주세요:

  1. Lettuce 커넥션 풀 대기 시간 설정: 현재 max-wait 설정이 없어 커넥션 풀 고갈 시 스레드가 무한정 대기할 수 있습니다. spring.data.redis.lettuce.pool.max-wait: 3s 설정을 추가하는 것을 권장합니다.
  2. 수동 설정 빈 확인: RedisConfig.java에서 직접 생성하는 bucket4jRedisClient 빈은 이 설정을 상속받지 않으므로, 해당 빈 설정에도 명시적인 타임아웃 적용이 필요합니다.

lettuce:
pool:
max-active: 50
Expand Down
Loading