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

웹소켓과 SSE 연결 60초 끊김 문제 + Nginx에 OAuth 설정 누락 #187

Merged
merged 3 commits into from
Jul 5, 2024

Conversation

JadeKim042386
Copy link
Member

@JadeKim042386 JadeKim042386 commented Jul 5, 2024

🔍️ 이 PR을 통해 해결하려는 문제

웹소켓 연결과 SSE 연결 요청 후 60초 후에 connection이 닫히는 문제가 있습니다. 이 문제는 Nginx 에서 기본으로 keep-alive timeout을 60초로 설정해놓았기 때문이었습니다.

✨ 이 PR에서 핵심적으로 변경된 사항

  • 웹소켓 요청과 SSE 요청 uri에 대한 nginx 설정을 분리
    • 지속연결이 필요한 웹소켓 연결 요청과 SSE 연결 요청만 따로 분리하여 keep-alive timeout을 설정하고 그 외의 요청은 지속연결이 되지 않도록 0으로 설정했습니다.
    • 웹소켓 또는 SSE 연결 요청 후 30분간 연결이 유지되도록 설정했습니다.

🔖 핵심 변경 사항 외에 추가적으로 변경된 부분

  • Nginx에 Oauth 로그인 요청에 대한 설정이 누락되어 추가했습니다.
  • 프론트엔드로 라우팅하는 설정도 불필요하여 삭제했습니다.
  • 사용하지 않는 불필요한 코드를 삭제했습니다.

📌 PR 진행 시 이러한 점들을 참고해 주세요

  • Reviewer 분들은 코드 리뷰 시 좋은 코드의 방향을 제시하되, 코드 수정을 강제하지 말아 주세요.
  • Reviewer 분들은 좋은 코드를 발견한 경우, 칭찬과 격려를 아끼지 말아 주세요.
  • Review는 특수한 케이스가 아니면 Reviewer로 지정된 시점 기준으로 1일 이내에 진행해 주세요.

Issue Tags

- 지속연결이 필요한 웹소켓 연결 요청과 SSE 연결 요청만 따로 분리하여 keep-alive timeout을 설정하고 그 외의 요청은 지속연결이 되지 않도록 0으로 설정
@JadeKim042386 JadeKim042386 added the bug Something isn't working label Jul 5, 2024
@JadeKim042386 JadeKim042386 self-assigned this Jul 5, 2024
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

- nginx 설정에 oauth2 로그인 요청 부분이 빠져있어 이를 추가함
- frontend로 라우팅해주는 부분도 불필요하여 삭제
@JadeKim042386 JadeKim042386 changed the title 웹소켓과 SSE 연결 60초 끊김 문제 웹소켓과 SSE 연결 60초 끊김 문제 + Nginx에 OAuth 설정 누락 Jul 5, 2024
@JadeKim042386 JadeKim042386 merged commit aa8c985 into develop Jul 5, 2024
2 checks passed
@JadeKim042386 JadeKim042386 deleted the feature/#186-fix-websocket-sse-connect branch July 5, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

웹소켓과 SSE 연결 60초 끊김 문제
1 participant