[Assignment] 선의 과제#19
Open
sunnny619 wants to merge 5 commits into
Open
Conversation
오타 및 내용 오류를 수정했습니다.
stateful VS stateless
DevDAN09
reviewed
Jul 30, 2024
| | | Stateful | Stateless | | ||
| | --- | --------------------------------------------------- | ---------------------------------------------------------------- | | ||
| | 정의 | 세션이 종료될 때까지, 클라이언트의 세션 정보를 저장하는 네트워크 프로토콜 | 클라이언트의 요청에 따른 응답만 처리하는 네트워크 프로토콜 | | ||
| | 예시 | TCP, FTP, Telnet 등 | HTTP, UDP, DNS 등 | |
thinkjin99
reviewed
Jul 30, 2024
| 클라이언트와 서버 관계에서 **서버가 클라이언트의 상태를 보존**함을 의미하는게 상태유지 | ||
| 자세히 말하자면 클라이언트와 서버 간에 송수신을 하며 단계별 과정을 진행하는데 있어, 서버에서 클라이언트가 이전 단계에서 제공한 값을 저장하고 다음 단계에서도 저장한 상태를 말함 | ||
|
|
||
| 예를 들어 홈 페이지에서 한 번 로그인 하면 페이지를 이동해도 로그인이 풀리지 않고 계속 유지되는 이유가 서버가 클라이언트의 상태를 기억하고 있기 때문에 가능한 것 |
Owner
There was a problem hiding this comment.
요건 stateless해도 가능한 기능이에요 만약 stateful의 상태를 기억하고 있다는 점을 강조하고 싶으면
서버의 메모리 내부에 클라이언트의 정보가 계속 남아있다는 점을 강조해야 해요.
stateless하더라도 매 요청마다 토큰값을 전달하면 사실상 서버는 유저의 로그인 여부를 항상 파악할 수 있어요.
| 위에서 상태를 유지한다는 함은, 서버에서 클라이언트의 상태 정보를 저장하고 있는 것 | ||
| 그렇다면 stateful의 문제점은 **해당 서버가 멈추거나 여러 이유로 해당 서버가 못쓰게** **되어** **다른 서버를 사용해야 할때** 발생함 | ||
| 왜냐하면 새로운 서버에는 이전 서버에서 가지고 있던 상태값을 가지고 있지 않기 때문 | ||
|
|
| ## stateless? | ||
|
|
||
| 클라이언트와 서버 관계에서 **서버가 클라이언트의 상태를 보존하지 않음**을 의미하는게 무상태 | ||
| 즉, stateless 구조에서 **서버는 단순히 요청이 오면 응답을 보내는 역할만 수행**하며, 상태 관리는 전적으로 클라이언트에게 책임이 있는 것 |
| ### stateless와 token | ||
|
|
||
| 무상태의 특징으로 클라이언트와 서버간의 통신에 필요한 모든 상태 정보들은 클라이언트에서 가지고 있다가 서버와 통신할때 데이터를 실어 보내는 것이기에 서버는 단순히 받아서 응답만 해주기 때문에 서버에 대한 부하가 현저히 줄어듦 | ||
|
|
Owner
There was a problem hiding this comment.
세션을 유지하느라 발생하는 리소스 VS 토큰 인증으로 인해 발생하는 리소스
중에 어떤게 더 클까요? stateless가 무조건 부하를 낮출까요?
Owner
There was a problem hiding this comment.
인 메모리 변수 접근 VS 토큰 해싱 중에 뭐가 더 효율적일까요?
Owner
|
전반적으로 완성도 있게 잘 작성해주셨습니다. 노력이 보이는 과제라 뜻깊은 것 같아요 |
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.
stateful VS stateless