도 협상, 서버 주도 협상, 그리고 투명한 협상이라고 불린다(표 17-1을 보라). 이 장
에서 우리는 각 기법의 동작 방식과 더불어 장점과 단점을 자세히 살펴볼 것이다.
기법 어떻게 동작하는가장점단점
클라이언트
주도
클라이언트가 요청을 보내면,
서버는 클라이언트에게 선택지
를 보내주고, 클라이언트가 선
택한다.
서버 입장에서 가장 구현하기
쉽다. 클라이언트는 최선의 선
택을 할 수 있다.
대기시간이 증가한다. 즉, 올바
른 콘텐츠를 얻으려면 최소 두
번의 요청이 필요하다.
서버 주도서버가 클라이언트의 요청 헤
더를 검증해서 어떤 버전을 제
공할지 결정한다.
클라이언트 주도 협상보다 빠
르다.
HTTP
는 서버가 가장 적
절한 것을 선택할 수 있도록
q
값 메커니즘을 제공하고, 서버
가 다운스트림 장치에게 요청
이 어떻게 평가되는지 말해줄
수 있도록 하기 위해
Vary
헤더
를 제공한다.
만약 결정이 뻔하지 않으면(헤
더에 맞는 것이 없으면), 서버는
추측을 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.