Repository navigation
fix: 중계의 동일 동시 조회 병합 - #221
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
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.
캐시가 비어 있을 때 동일한 편의점 조회가 동시에 들어오면 각각 원본을 호출하고 예산을 소비했습니다. 인증·입력 검증 후 모든 조건이 같은 진행 조회를 공유하여 최초 동시 요청도 원본 호출과 예산 소비를 한 번으로 줄입니다.
각 요청의 응답 body·request ID·취소는 독립이며, 마지막 대기자가 취소하면 원본 작업도 취소합니다. 최초 요청의 전체15초 기한을 공유 작업에 적용하고, 성공 JSON만 기존 TTL 캐시에 저장합니다. 다른 상품·지역·인증키·조건은 합치지 않으며 동시 원본4개·접수32개·분당30회·일3,000회 상한을 유지합니다. 캐시 없는 디트릭스 작업은 공유하지 않습니다.
검증: baseline70개, 신규 회귀11개, 전체214파일·2,350tests 통과. npm run check/build 성공, coverage Statements/Branches/Functions/Lines100%, 독립 코드 리뷰2회 결함없음. 로컬150ms 모의 원본의 동일20개 최초 요청에서 원본20→1회, 완료803→179ms(이후 캐시3ms/원본0회). 100개 동시 요청에서는 접수32개200·초과68개503 및 원본1회를 확인했습니다. GS 서버 부하 테스트나 GS 처리량 수치는 아닙니다.
GS 공식 가상기기의 실제 재고 UI 조회는 별도 PoC에서 확인했지만 이번 변경에는 앱 UI 중계 연결·GS API 인증 확보가 포함되지 않습니다. 직접 재고 API는 여전히401/인증키없음입니다. 운영 Mac/Worker/CLI 변경·배포는 하지 않았습니다.