Skip to content
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

feat: HikariCP, Tomcat 튜닝 #644

Merged
merged 24 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d06a41a
refactor: 임시로 DEV CI/CD 스크립트 수정
masonkimseoul Oct 23, 2024
0b64278
refactor: branch 경로 수정 및 docker에만 push 할 수 있도록 수정
masonkimseoul Oct 23, 2024
dfb2ded
refactor: accept-count 200
masonkimseoul Oct 23, 2024
3241112
refactor: - accept-count 200, + hikari max pool size 50
masonkimseoul Oct 23, 2024
3c16b6b
refactor: + hikari max pool size 200
masonkimseoul Oct 24, 2024
b0f6267
refactor: - hikari max pool size 30
masonkimseoul Oct 24, 2024
4df3987
refactor: OfferingEntity의 Member에 FetchType.LAZY 설정 및 트랜잭션 추가
masonkimseoul Oct 24, 2024
5039a3a
refactor: getAllOffering에 트렌젝션 적용
fromitive Oct 24, 2024
baf418b
chore: actuator에 hikariCP 메트릭 지표 추가
ChooSeoyeon Oct 24, 2024
34fc4e2
refactor: - hikari max pool size 20
masonkimseoul Oct 24, 2024
0a16765
refactor: + hikari max pool size 40
masonkimseoul Oct 24, 2024
849d270
refactor: - hikari max pool size 30
masonkimseoul Oct 24, 2024
331d68d
refactor: - hikari max pool size 20
masonkimseoul Oct 24, 2024
838c28e
refactor: + hikari max pool size 50
masonkimseoul Oct 24, 2024
ed28db9
refactor: - hikari max pool size 4
masonkimseoul Oct 24, 2024
a93ad97
refactor: + hikari max pool size 40
masonkimseoul Oct 24, 2024
9ba65c9
refactor: hikari max pool size default(10)
masonkimseoul Oct 24, 2024
b6edac1
refactor: + hikari max pool size 8
masonkimseoul Oct 24, 2024
4996eee
refactor: 테스트를 위해 공모 생성 시 알림 off
masonkimseoul Oct 24, 2024
1917fc0
refactor: - tomcat max threads 3
masonkimseoul Oct 24, 2024
cd84433
refactor: + tomcat max threads 100
masonkimseoul Oct 24, 2024
703ebbd
refactor: default로 회귀
masonkimseoul Oct 24, 2024
22b243c
feat: HikariCP, Tomcat 설정 및 주석 해제
masonkimseoul Oct 24, 2024
63c4ff6
refactor: metric 관련 설정 제거
masonkimseoul Oct 24, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/backend-dev-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- ".github/workflows/backend-dev-ci-cd.yml"
- "Dockerfile"
# pull_request:
# branches: [ "develop" ]
# branches: [ "chongdae" ]
# paths:
# - "backend/**"
# - ".github/workflows/backend-dev-ci-cd.yml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
Expand Down Expand Up @@ -48,7 +49,7 @@ public class OfferingEntity extends BaseTimeEntity {
private Long id;

@NotNull
@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
private MemberEntity member;

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class OfferingService {
private final OfferingFetcher offeringFetcher;
private final Clock clock;

@Transactional(readOnly = true)
public OfferingDetailResponse getOfferingDetail(Long offeringId, MemberEntity member) {
OfferingEntity offering = offeringRepository.findById(offeringId)
.orElseThrow(() -> new MarketException(OfferingErrorCode.NOT_FOUND));
Expand All @@ -72,6 +73,7 @@ public OfferingAllResponseItem getOffering(Long offeringId) {
return new OfferingAllResponseItem(offering, offeringPrice);
}

@Transactional(readOnly = true)
public OfferingAllResponse getAllOffering(String filterName, String searchKeyword, Long lastId, Integer pageSize) {
Pageable pageable = PageRequest.ofSize(pageSize);
OfferingFilter filter = OfferingFilter.findByName(filterName);
Expand Down Expand Up @@ -186,6 +188,7 @@ private void updateStatus(OfferingEntity offering) { // TODO : 도메인 분리
}

@WriterDatabase
@Transactional
public void deleteOffering(Long offeringId, MemberEntity member) {
OfferingEntity offering = offeringRepository.findById(offeringId)
.orElseThrow(() -> new MarketException(OfferingErrorCode.NOT_FOUND));
Expand Down
9 changes: 9 additions & 0 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
server:
tomcat:
threads:
max: 35
max-connections: 1024
accept-count: 242

spring:
application:
name: chongdae
datasource:
url: jdbc:h2:mem:database
hikari:
maximum-pool-size: 8
jpa:
show-sql: true
defer-datasource-initialization: true
Expand Down