[TIL] HTTP : The Definitive Guide "p147 ~ p148"

시윤·2024년 4월 12일
0

[TIL] Two Pages Per Day

목록 보기
62/110
post-thumbnail

Chapter 6. Proxies

(해석 또는 이해가 잘못된 부분이 있다면 댓글로 편하게 알려주세요.)


❤️ 원문 번역 ❤️

URI Client Auto-Expansion and Hostname Resolution

Browsers resolve request URIs differently, depending on whether or not a proxy is present. Without a proxy, the browser takes the URI you type in and tries to find a corresponding IP address. If the hostname is found, the browser tries the corresponding IP addresses until it gets a successful connection.

  • 브라우저는 프록시의 존재 여부에 따라 요청 URI를 다르게 해결합니다.

  • 프록시가 없는 상황에서 브라우저는 사용자가 입력한 URI를 가져와 일치하는 IP 주소를 찾으려고 시도합니다.

  • 브라우저는 호스트명이 발견되면 성공적인 연결을 얻게 될 때까지 일치하는 IP 주소로 연결을 시도합니다.

But if the host isn’t found, many browsers attempt to provide some automatic “expansion” of hostnames, in case you typed in a “shorthand” abbreviation of the host (refer back to “Expandomatic URLs” in Chapter 2):*

  • 그러나 만약 호스트가 발견되지 않는다면, 많은 브라우저는 사용자가 호스트의 약어 표현을 입력했을 때 호스트명 자동 확장 기능을 제공하려는 노력을 기울입니다. (Chapter 2의 "Expandomatic URLs"를 참고해 주시기 바랍니다.)

• Many browsers attempt adding a “www.” prefix and a “.com” suffix, incase you just entered the middle piece of a common web site name (e.g., to let people enter “yahoo” instead of “www.yahoo.com”).

  • 많은 브라우저는 사용자가 일반적인 웹 사이트 이름의 중간 부분만 입력한 경우 "www." 접두사와 ".com" 접미사를 추가하고자 노력합니다. (사용자가 "www.yahoo.com" 대신 "yahoo"를 입력하는 것을 허용합니다)

• Some browsers even pass your unresolvable URI to a third-party site, which attempts to correct spelling mistakes and suggest URIs you may have intended.

  • 일부 브라우저는 3rd-party 사이트로 해결할 수 없는 URI를 전달하기도 합니다.

  • 이때 스펠링 오류를 바로잡고 사용자가 의도한 URI를 추측하려고 시도합니다.

• In addition, the DNS configuration on most systems allows you to enter just the prefix of the hostname, and the DNS automatically searches the domain. If you are in the domain “oreilly.com” and type in the hostname “host7,” the DNS automatically attempts to match “host7.oreilly.com”. It’s not a complete, valid hostname.

  • 나아가 대부분의 시스템의 DNS 구성은 사용자가 호스트명의 접두사만 입력해도 DNS가 자동으로 도메인을 검색할 수 있게 합니다.

  • 만약 "oreilly.com" 도메인에 있는 사용자가 호스트명을 "host7"로 입력하면, DNS는 자동으로 "host7.oreilly.com"을 매칭하려 시도합니다.

  • 이것은 완전하고 유효한 호스트명이 아닙니다.


URI Resolution without a Proxy

Figure 6-16 shows an example of browser hostname auto-expansion without a proxy. In steps 2a–3c, the browser looks up variations of the hostname until a valid hostname is found.

  • Figure 6-16은 프록시 없이 브라우저 호스트명을 자동 확장하는 기능의 예시를 보여줍니다.

  • 2a-3c 과정에서 브라우저는 유효한 호스트명이 발견될 때까지 호스트명의 여러 변형들을 조회합니다.

Here’s what’s going on in this figure:

• In Step 1, the user types “oreilly” into the browser’s URI window. The browser uses “oreilly” as the hostname and assumes a default scheme of “http://”, a default port of “80”, and a default path of “/”.

• In Step 2a, the browser looks up host “oreilly.” This fails.

• In Step 3a, the browser auto-expands the hostname and asks the DNS to resolve “www.oreilly.com.” This is successful.

• The browser then successfully connects to www.oreilly.com.

  • 절차는 다음과 같습니다.
    • Step 1에서 사용자가 브라우저의 URI 창에 "oreilly"를 입력합니다. 브라우저는 "oreilly"를 호스트명으로 사용하고 디폴트 scheme인 "http://"와 디폴트 포트 번호인 "80", 디폴트 경로인 "/"을 가정합니다.
    • Step 2a에서 브라우저가 "oreilly" 호스트를 찾지만 실패합니다. (실제 호스트명은 "www.oreilly.com"이기 때문)
    • Step 3a에서 브라우저가 호스트명을 자동 확장하여 DNS에게 "www.oreilly.com"을 해결할 것을 요청합니다. 이것은 성공적입니다.
    • 브라우저가 www.oreilly.com에 성공적으로 연결합니다.

🧡 요약 정리 🧡

Browser Auto-Expansion

  • 클라이언트가 입력한 호스트가 발견되지 않을 때 브라우저가 호스트명을 자동 확장하는 것
    * (Chapter 02. Expandomatic URLs) https://velog.io/@dvlp-sy/TIL-HTTP-The-Definitive-Guide-p34-p35
  • Hostname Expansion : 호스트명의 일부분을 입력하면 자동으로 URL을 완성
  • History Expansion : 이전에 방문한 URL을 기반으로 완성된 입력을 예측하여 제시

URI Resolution without a Proxy

  • DNS를 통해 주어진 호스트명을 IP 주소로 변환 시도
  • 만약 일치하는 호스트명이 없다면 Auto-Expansion 된 호스트명으로 재요청
  • DNS로부터 성공적으로 IP 주소를 돌려받으면 브라우저 연결
  • DNS가 호스트명을 찾지 못했을 때, 도메인 검색 목록에 있는 각 도메인을 접미사로 붙여 호스트명을 찾으려고 시도하는 기법
  • "oreilly.com" 도메인에 있는 사용자가 호스트명을 "host7"로 입력하면, DNS는 자동으로 "host7.oreilly.com"을 매칭하려 시도

* 도메인명 : 네트워크 디바이스 식별자 (ex. google.com)
* 호스트명 : 도메인의 하위 레벨에 위치하는 네트워크 디바이스 식별자 (ex. mail.google.com)


💛 감상 💛

  • 글을 읽다 보니 도메인 이름과 호스트 이름의 개념을 제대로 이해하지 못하고 있다는 사실을 알게 되었습니다. 도메인은 domain name(google)과 top level domain(.com)으로 이루어져 있습니다. 큰 범주에서의 domain name(google.com)은 네트워크 디바이스를 식별하는 이름입니다. host name(mail) 또한 비슷한 역할을 하지만 범위가 도메인 내로 한정됩니다. 즉 host name은 도메인의 하위 레벨에 위치하는 네트워크 디바이스 식별자입니다. 그리고 큰 범주에서의 host name(mail.google.com)은 IP 주소에 상응하는 개념입니다.

  • 큰 범주에서의 domain과 작은 범주에서의 domain, 큰 범주에서의 host name과 작은 범주에서의 host name이 동일한 이름으로 혼용되고 있어서 의미를 이해하기가 더 어려웠던 것 같습니다.

profile
맑은 눈의 다람쥐

0개의 댓글

관련 채용 정보