-
Notifications
You must be signed in to change notification settings - Fork 1
이슈 생성 시 커넥션 풀 트러블 슈팅 해결 및 성능 개선 #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* refactor: hikari pool 설정 지움 (모니터링 때문에) * refactor: 트랜잭션 2개로 복귀 (모니터링 때문에)
* refactor: hikari pool 설정 지움 (모니터링 때문에) * refactor: 트랜잭션 2개로 복귀 (모니터링 때문에) * refactor: hikaripool 로그
* refactor: hikari pool 설정 지움 (모니터링 때문에) * refactor: 트랜잭션 2개로 복귀 (모니터링 때문에) * refactor: hikaripool 로그 * refactor: hikaripool 로그
* refactor: tomcat thread 50 그리고 hikari pool 75 * refactor: tomcat thread 최소개수도 50
* refactor: tomcat thread 50 그리고 hikari pool 75 * refactor: tomcat thread 최소개수도 50 * refactor: tomcat thread 최소개수도 100 * refactor: tomcat thread 최소개수도 100
* refactor: tomcat thread 50 그리고 hikari pool 75 * refactor: tomcat thread 최소개수도 50 * refactor: tomcat thread 최소개수도 100 * refactor: tomcat thread 최소개수도 100 * refactor: tomcat thread 200
* refactor: tomcat thread 50 그리고 hikari pool 75 * refactor: tomcat thread 최소개수도 50 * refactor: tomcat thread 최소개수도 100 * refactor: tomcat thread 최소개수도 100 * refactor: tomcat thread 200 * refactor: tomcat thread
* feat: redis issuenumber 증가 * feat: redis write-back 전략을 위해 스케줄러 추가
* refactor: redis replication 구성 * refactor: 이메일 비동기 처리 서비스로 변경
* feat: 멤버초대 컨트롤러, 서비스 틀 구축 * feat: UUID 초대토큰 생성 * feat: ses 서비스 도입 * feat: 이메일 초대 토큰 키-값 레디스에 저장 * feat: 이메일 초대 토큰 키-값 레디스에 저장 * feat: 비동기 적용 및 외부서비스 장애 발생 시 처리 로직 구현 * feat: 타임아웃 설정 * refactor: 이메일 스레드 개수 * refactor: 딜레이 1초는 너무 길기때문에 500ms로 줄임
* refactor: gitignore에 /mysql, /redis, .env 추가 * test: 테스트때 .env 주입 인텔리제이에서 환경변수 수동 주입이 아닌 .env파일 주입해서 환경변수 자동주입되도록 수정 * test: 테스트컨테이너 로컬에서 동작하지않은 오류 수정 * test: EpicFactory epic 생성 테스트 추가
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
## 코드 리뷰할 때 안봐도 되는 클래스1. 성능테스트를 용이하게 하기 위해 JwtAuthFilter와 Spring Security 관련 인증 필터는 다 비활성화 시켰습니다.2. Retry 어노테이션과 RetryAspect는 낙관적락으로 테스트해볼때 써보고 사용되지 않은 클래스이므로 제거하겠습니다.3. cd, Dockerfile, docker-compose 다 넘기셔도 됩니다4. DummyDataLoader도 마찬가지5. ...~~
중점적으로 봐야할 클래스들
해결한 부분
요약
20명의 동시 이슈 생성 요청 시 발생한 커넥션 풀 부족 문제로 발생한 데드락을 해결하고, 100명 규모의 동시 사용자 처리를 위한 성능 개선을 수행
상황
해결방안
커넥션 제거 전 다이어그램
synchronized와 ReentrantLock은 다중 서버환경에서 동시성 제어가 불가능하여 부적절
낙관적락으로 Retry 3번 시도하는 것은 충돌 발생이 오히려 증가되어 비관적락보다 성능저하가 일어남
이슈 번호 생성 로직을 따로 트랜잭션을 분리했지만(REQUIRED_NEW) 히카리 풀 적정 개수를 찾는 게 매우 어려움
Redis의 atomic INCR 연산을 활용한 동시성 제어 방식 도입
결과