Skip to content

Conversation

@hyerinhwang-sailin
Copy link
Collaborator

@hyerinhwang-sailin hyerinhwang-sailin commented Sep 12, 2025

Related issue 🛠

Work Description ✏️

배경

  • 운영에서 아래 오류가 반복 발생:
    • playground.profile/recommend 호출 중 playground → auth 내부 GET의 쿼리스트링이 ~14KB까지 커지면서 414 Request-URI Too Large.
    • 우리 쪽 요청의 size가 작아도(예: 2) 상위 호출(playground 내부)에서 이미 414가 발생하여 전체 실패.
  • 동시에, “size와 무관하게 추천이 항상 1명만 나오는” 현상 발생:
    • 원인: 다건 프로필 조회에서 CSV를 URLEncoder로 선 인코딩 → Feign이 재인코딩(더블 인코딩) → 서버가 콤마 복원을 못하고 단일 값으로 처리되어 응답이 1건만 내려옴.

변경 사항

  1. FriendRecommender
  • playgroundUserIdsProvider.findPlaygroundIdsByType(...) 호출에서 414 감지 시 ALL_USER로 fallback(임시 조치)
    → 서비스 연속성 확보, 장애 전파 차단.
  • 우리 측 Platform(auth) 호출은 기존대로 oversample=min(size*5, 50) 적용
    → URI 길이를 항상 짧게 유지(414 재발 방지).
  • size ≤ 0 가드 및 로깅 보강.
  1. PlaygroundClient
  • getPlaygroundMemberProfiles를 @QueryMap(Map<String, Collection>) 로 변경
    → memberIds=1&memberIds=2... 반복 파라미터로 직렬화(가장 안전하고 명확).
  1. PlaygroundAuthService
  • URLEncoder.encode(csv) 제거, QueryMap으로 memberIds 컬렉션 전송
    → 더블 인코딩 제거, 다건 응답 정상화(N건 요청 → N건 응답).

기대 효과

  • 414 재발 방지:
    • 우리 측 auth 호출은 oversample(≤50)로 안전.
    • playground 내부 414는 fallback으로 우회(ALL_USER 기반으로 degrade).
  • 추천 개수 정상화:
    • 다건 프로필 조회가 실제 N건으로 반환되어 최종 추천이 요청 size에 맞게 출력.

Trouble Shooting ⚽️

Related ScreenShot 📷

Uncompleted Tasks 😅

후속 과제(플랫폼/플레이그라운드 협의)

  • Platform(auth)
    • POST /api/v1/users/bulk (Body: { "userIds": [...] }) 도입(배치 100~200), GET URI 길이 한계 제거.
  • Playground
    • 내부 auth 연동을 POST Body bulk로 개선하거나, limit/page 파라미터 지원.
    • 외부 profile/recommend에서 limit 입력 수용 → 내부 쿼리 규모 제어.
    • 414 시 부분 결과 반환 등 degrade 정책.

To Reviewers 📢

@height
Copy link

height bot commented Sep 12, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@hyerinhwang-sailin hyerinhwang-sailin self-assigned this Sep 12, 2025
@hyerinhwang-sailin hyerinhwang-sailin added the 🛠️ BugFix 버그 해결 label Sep 12, 2025
@hyerinhwang-sailin hyerinhwang-sailin merged commit 1db82e6 into dev Sep 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 친구 추천 관련 Playground 414 대응(fallback) 및 Feign QueryMap 전환으로 다건 프로필 조회 정상화

1 participant