-
Notifications
You must be signed in to change notification settings - Fork 0
7주차 과제 제출 #13
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
Open
hyodongg
wants to merge
25
commits into
main
Choose a base branch
from
seminar/#8
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
7주차 과제 제출 #13
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
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.
🔥Pull requests
👷 과제 구현
필수과제
선택과제
구현한 내용에 대해서 설명해주세요
@Column(length = 300)을 통해 DB 레벨에서 댓글 길이 제한 했습니다.@Size(max = 300)을 통해 DTO 레벨에서 댓글 길이 제한 했습니다.GET /articles시에 댓글 전체 내용 대신 댓글 수만 반환하여 응답 크기를 줄였습니다.GET /articles/{id}시에 해당 게시글의 모든 댓글 정보를 포함하여 반환했습니다. 상세페이지에서 필요한 전체 정보를 제공합니다Comment<->Member연관관계 매핑을 통해 댓글 작성자 정보를 볼 수 있습니다.캐시
대용량 데이터
article 데이터를 약 10,000개 정도 넣고 테스트를 해봤는데, 실행 속도는 차이가 안나서 Selectivity기반으로 판단했습니다.
실행시간이 별로 차이나지 않은 이유가 궁금해서 찾아보았는데
이런 요인이 있다고 합니다! 현재 데이터 크기가 그리 크지 않아서 이렇게 되는 것 같긴 합니다.
인프라 구조도
다중 서버 운영은 아직 먼 얘기 같아서 단일 서버로 구성 했습니다. VPC 안에 Public, Private 나누고 Nginx와 스프링 서버를 도커를 활용하여 띄웁니다. 현재 스프링 서버가 하나인데 깜빡하고 하나만 그렸습니다. Blue, Green으로 나눠 무중단 배포까지 적용하면 좋을 것 같습니다.
다중 서버 운영시 앞단에 ALB를 두어 트래픽 분산하면 좋을 것 같습니다.
테스트
현재 구현되어 있는 MemberService들의 메서드 단위테스트를 진행했습니다. 실패, 성공했을 경우를 나눠서 했습니다.
구현하며 고민했던 내용을 적어주세요 (사소한 것도 좋아요)
RedisConfig파일에서mapper.activateDefaultTyping(ptv, ObjectMapper.DefaultTyping.EVERYTHING;이 부분을 EVERYTHING으로 설정 시 임시적으로 해결은 되지만 EVERYTHING이 deprecated 예정이라고 해서 해결중입니다.. 혹시 관련 문제 있거나 아시는 분 도와주시면 감사하겠습니다.키워드 과제 정리내용
🚨 참고 사항
캐시관련, 인덱스관련 시간 차 등등 무수한 팁들 공유 부탁드립니다.
테스트관련
현재 service단에서 단위 테스트만 진행 했지만 컨트롤러 테스트 -> 레포지토리 테스트 -> 통합테스트 순으로 이어나갈 예정입니다.