Upload
-
View
177
Download
4
Embed Size (px)
Citation preview
HTTP 완벽가이드10 장 HTTP/2.0
http://blog.chromium.org/2016/02/transitioning-from-spdy-to-http2.html
“Chrome will no longer support SPDY.”
https://www.nginx.com/blog/nginx-1-9-5/d
“NGINX 1.9.5 Released with HTTP/2 Support”
What are the key differences to HTTP/1.x?
http://http2.github.io/faq/• is binary, instead of textual
• is fully multiplexed, instead of ordered and blocking
• can therefore use one connection for parallelism
• uses header compression to reduce overhead
• allows servers to “push” responses proactively into client caches
Binary
• 파싱 , 사이즈 모두 효과적• 에러율 더 적음• 악 ! 텔넷이 안됨 , wireshark 사용• http://httpwg.org/specs/rfc7540.html#HEADE
RS
https://assets.wp.nginx.com/wp-content/uploads/2015/10/HTTP2.png
http://research.worksap.com/wp-content/uploads/2015/08/server-push.png
HTTP 완벽가이드11 장 클라이언트 식별과 쿠키
HTTP Stateless• 모든 HTTP 요청 / 응답은 사이클은 서로 무관하다• HTTP 클라이언트와 무관하게 각 HTTP 연결의 데이터는 서로 상관이 없다• HTTP 는 세션이 없다• 그래서… 몇가지 기술을 통해 HTTP 연결을 식별
• 사용자 식별 관련 정보를 전달하는 HTTP 헤더• 클라이언트 IP
• 사용자 로그인 인증을 통해 헤더에 인증값을 넣고• 무언가 긴 값을 가진 URL 이나• 쿠키
헤더• From
• User-Agent
• Referer
• Authorization
• Client-ip
• X-Forwared-For
• Cookie
클라이언트 IP
• 식별 어려움• NAT
• ISP 의 동적 IP
• PROXY
사용자 로그인
뚱뚱한 URL• 사이트마타 식별하는 특정한 URL 포맷을 추가• 단점
• 못생김• 다른 사용자와 공유하면 개인정보가 같이 공유될지도• URL 베이스의 캐시 사용을 할 수 없음• 캐시가 없으면 HTML 을 다시 만들어야됨• 로그아웃하면 정보가 사라짐• URL 유지하기 힘듬
쿠키• Set-cookie 헤더 이용• 세션쿠키
• 브라우저 종료 후 사라짐• 지속 쿠키
• 특정 기간 브라우저 스토리지에 보관• Expire, Max-Age 쿠키 파라미터 이용
• Version 0 Set-cookie 네스케이프 쿠키• Version 1 (RFC 2965)
Set-Cookie: name=value [; expire=date] [;
path=path] [;domain=domain]
[;secure]Cookie: name1=value1
[;name2=value2]
사용자에게 쿠키 할당