my-medium.cnf_您的手機如何打開medium.com-我將讓門衛和圖書管理員解釋。

my-medium.cnf

by Andrea Zanin

由Andrea Zanin

您的手機如何打開medium.com-我將讓門衛和圖書管理員解釋。 (How your phone opens medium.com — I’ll let a doorman and a librarian explain.)

Hey did you notice what just happened? You clicked a link, and now here you are reading this article. But did you think about how your browser knew that the link you clicked referred to this article, and that this article contained these words?

嘿,您注意到發生了什么嗎? 您單擊了一個鏈接,現在您正在這里閱讀本文。 但是您是否考慮過瀏覽器如何知道您單擊的鏈接引用了本文,并且本文包含了這些詞?

It’s something so common that we forget about it, but the mechanism behind it is fascinating. In this article we will explore it using real world analogies.

這是很常見的事情,我們忘記了,但是它背后的機制令人著迷。 在本文中,我們將使用現實世界的類比進行探索。

電腦如何對話 (How computers talk)

When you open a website, your browser is asking some other computer somewhere in the world for the data that will allow it to show you the page (for example, the text you are reading now).

當您打開網站時,瀏覽器正在向世界其他地方的其他計算機詢問數據,以使其能夠顯示頁面(例如,您正在閱讀的文本)。

This act of asking another computer is not unlike sending a piece of mail (physical mail, not an email) to a friend and waiting for his reply.

詢問另一臺計算機的行為與向朋友發送一封郵件(物理郵件,而不是電子郵件)并等待其答復無異。

If John wants to send Brittany some mail, he needs to know her address. In the internet world, instead of having physical addresses we have IP addresses. They work the same way, just with a computer instead of a mailbox.

如果約翰想發送一些郵件給布列塔尼,他需要知道她的地址。 在互聯網世界中,我們沒有IP地址,而是擁有物理地址。 它們的工作方式相同,只是使用計算機而不是郵箱。

告訴我有關此IP的更多信息 (Tell me more about this IP thing)

Before we dive in the details about IP addresses, I want you to imagine that you are staying in a luxurious hotel with hundreds of rooms and a fancy doorman (not bad right?).

在我們深入介紹IP地址的細節之前,我想讓您想象一下,您住在一家豪華酒店,里面有數百個房間和一個看門的門衛(還不錯吧?)。

Now back to IP addresses: your standard IP address looks like this: 102.134.122.234. The first 9 digits are the address of the virtual hotel you are staying in, while the last 3 are your room. While the address of the virtual hotel is fixed, the room you are staying in is chosen by the hotel.

現在回到IP地址:您的標準IP地址如下所示:102.134.122.234。 前9位數字是您所住虛擬酒店的地址,后3位數字是您的房間。 虛擬酒店的地址固定后,酒店將選擇您要入住的房間。

If anyone wants to send you a message, they need to know the address of the hotel and your room number. So they send the message to the hotel and the doorman delivers it directly to you.

如果有人想向您發送消息,他們需要知道酒店的地址和您的房間號。 因此,他們將消息發送給酒店,然后門衛將消息直接傳遞給您。

The virtual hotel is like your home WiFi network. Its address is decided by your internet provider, while your room number is decided by your home router.

虛擬酒店就像您的家庭WiFi網絡。 它的地址由您的互聯網提供商決定,而房間號由家庭路由器決定。

數字很??復雜 (Numbers are complicated)

You may have noticed that if you want to open medium.com you don’t need to know its IP address. This is where the internet becomes smarter than the postal service.

您可能已經注意到,如果要打開medium.com,則無需知道其IP地址。 這是互聯網變得比郵政服務更智能的地方。

On top of IP addresses, there is a system to match easy to remember names to IPs: the Domain Name System.

在IP地址的頂部,有一個將易于記憶的名稱與IP進行匹配的系統:域名系統。

Finally, here is what happens when your phone wants to open medium.com

最后,這是您的手機要打開medium.com時發生的情況

  • The phone sends the request to the doorman (router) and asks it to send it to medium.com

    電話將請求發送到門衛(路由器),并要求將其發送到medium.com
  • the router asks a trusted agency (your internet provider) for the IP of medium.com

    路由器向可信代理商(您的互聯網提供商)詢問medium.com的IP
  • this trusted agency then refers to a worldwide organization (the Root Server) that recognizes the Top Level Domain (.com, .us, .org, …)

    然后,該受信任的代理機構指的是認可頂級域(.com,.us,.org等)的全球組織(根服務器)。
  • the Root Server then asks the digital librarian responsible for that TLD

    然后,根服務器詢問負責該TLD的數字圖書館員
  • finally the librarian opens his master record, looks for the website we requested, and responds with the IP

    最后,圖書館管理員打開他的主記錄,查找我們請求的網站,并以IP進行回復

Finally your phone can send the request directly to Medium’s address (IP). All of this in less than a tenth of a second.

最終,您的手機可以將請求直接發送到Medium的地址(IP)。 所有這些都在不到十分之一秒的時間內。

我們會用完地址嗎? (Will we run out of addresses?)

Yes we will run out of IP addresses — and soon. But don’t panic, a solution is already being implemented.

是的,我們很快就會用完IP地址。 但是請不要驚慌,已經在實施一種解決方案。

First we have to take a step back: up until now I talked about IP addresses, but I should have said IP version 4. The solution is IP version 6, and it looks even uglier: 2001:0db8:0000:0042:0000:8a2e:0370:7334

首先,我們必須退后一步:到目前為止,我談到的是IP地址,但我應該說的是IP版本4。解決方案是IP版本6,它看起來更難看:2001:0db8:0000:0042:0000: 8a2e:0370:7334

This alphanumeric monstrosity leads to an astronomical amount of possible IPs, so issue solved ??.

這種字母數字的怪異性導致可能的IP數量達到天文數字,因此問題得以解決。

離開之前 (Before you leave)

In this article we analyzed how your phone understands what medium.com is, but what about the HTTPS part of the link? I wrote another article about it: https explained with carrier pigeons.

在本文中,我們分析了您的手機如何理解media.com,但是該鏈接的HTTPS部分又如何呢? 我寫了另一篇文章: https用信鴿解釋 。

If you liked the article don’t forget that you can ? up to 50 times.

如果您喜歡這篇文章,別忘了可以嗎? 最多50次

翻譯自: https://www.freecodecamp.org/news/how-can-your-phone-open-medium-com-62ec36b1429f/

my-medium.cnf

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/394750.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/394750.shtml
英文地址,請注明出處:http://en.pswp.cn/news/394750.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

springboot自動配置的原理_SpringBoot自動配置原理

SpringBoot的啟動入口就是一個非常簡單的run方法,這個run方法會加載一個應用所需要的所有資源和配置,最后啟動應用。通過查看run方法的源碼,我們發現,run方法首先啟動了一個監聽器,然后創建了一個應用上下文Configurab…

Django first lesson 環境搭建

pycharm ide集成開發環境 (提高開發效率) 解釋器/編譯器編輯器調試環境虛擬機連接 設置VirtualBox端口 操作1 操作2 點擊號添加,名稱為SSH,其中主機端口為物理機的端口,這里設置為1234,子系統端口為虛擬機的…

《Drupal實戰》——3.3 使用Views創建列表

3.3 使用Views創建列表 我們接著講解Views的設置,首先做一個簡單的實例。 3.3.1 添加內容類型“站內公告” 添加一個內容類型“站內公告”,屬性配置如表3-1所示。 為該內容類型設置Pathauto的模式news/[node:nid],并且我們在這里將節點類型…

c語言函數編正切余切運算,淺談正切函數與余切函數的應用

九年義務教育三年制初級中學“數學”課本中,對正切函數和余切函數的定義是這樣下的:在RtABC中,∠C=90,a&#…

wget命令下載文件

wget -r -N -l -k http://192.168.99.81:8000/solrhome/ 命令格式: wget [參數列表] [目標軟件、網頁的網址] -V,–version 顯示軟件版本號然后退出; -h,–help顯示軟件幫助信息; -e,–executeCOMMAND 執行一個 “.wgetrc”命令 -o,–output…

idea mybatis generator插件_SpringBoot+MyBatis+Druid整合demo

最近自己寫了一個SpringBootMybatis(generator)druid的demo1. mybatisgenerator逆向工程生成代碼1. pom文件pom文件添加如下內容,引入generator插件org.mybatis.generator mybatis-generator-maven-plugin 1.3.5 mysql …

vr格式視頻價格_如何以100美元的價格打造自己的VR耳機

vr格式視頻價格by Maxime Coutte馬克西姆庫特(Maxime Coutte) 如何以100美元的價格打造自己的VR耳機 (How you can build your own VR headset for $100) My name is Maxime Peroumal. I’m 16 and I built my own VR headset with my best friends, Jonas Ceccon and Gabriel…

python_裝飾器

# 裝飾器形成的過程 : 最簡單的裝飾器 有返回值得 有一個參數 萬能參數# 裝飾器的作用# 原則 :開放封閉原則# 語法糖:裝飾函數名# 裝飾器的固定模式 import time # time.time() # 獲取當前時間 # time.sleep() # 等待 # 裝飾帶參數的裝飾器 def timer…

歐洲的數據中心與美國的數據中心如何區分?

人會想到這意味著,在歐洲和北美的數據中心的設計基本上不會有大的差異。不過,一些小的差異是確實存在的。您可能想知道為什么你需要了解歐洲和北美的數據中心之間的差異,這對你的公司有幫助嗎?一個設計團隊往往能從另一個設計團隊那里學到東…

老農過河

java老農過河問題解決 http://www.52pojie.cn/thread-550328-1-1.html http://bbs.itheima.com/thread-141470-1-1.html http://touch-2011.iteye.com/blog/1104628 轉載于:https://www.cnblogs.com/wangjunwei/p/6032602.html

python isalnum函數_探究Python中isalnum()方法的使用

探究Python中isalnum()方法的使用 isalnum()方法檢查判斷字符串是否包含字母數字字符。 語法 以下是isalnum()方法的語法: str.isa1num() 參數 NA 返回值 如果字符串中的所有字符字母數字和至少有一個字符此方法返回 true,否則返回false。 例子 下面的例…

docker快速入門_Docker標簽快速入門

docker快速入門by Shubheksha通過Shubheksha Docker標簽快速入門 (A quick introduction to Docker tags) If you’ve worked with Docker even for a little while, I bet you’ve come across tags. They often look like “my_image_name:1” where the part after the col…

動態規劃算法——最長上升子序列

今天我們要講的是最長上升子序列(LIS)。【題目描述】給定N個數,求這N個數的最長上升子序列的長度。【樣例輸入】      【樣例輸出】7        42 5 3 4 1 7 6那么什么是最長上升子序列呢? 就是給你一個序列…

如何快速掌握一門新技術/語言/框架

IT行業中的企業特點是都屬于知識密集型企業。這種企業的核心競爭力與員工的知識和技能密切相關。而如果你在企業中扮演的是工程師的角色的話,那么 你的核心競爭力就是IT相關的知識與技能的儲備情況。而眾所周知,IT行業是一個大量產生新知識的地方&#x…

c語言今天星期幾問題,C語言輸入今天星期幾

滿意答案迷茫03222015.07.24采納率&#xff1a;55% 等級&#xff1a;9已幫助&#xff1a;665人123456789101112131415161718192021#include<stdio.h>int main(void){ enum weekday{ sun, mon, tue, wed, thu, fri, sat }; int n; printf("輸入星期數(0-…

備忘錄模式 詳解

定義 在不破壞封裝性的前提下&#xff0c;捕獲一個對象的內部狀態&#xff0c;并在該對象之外保存這個狀態&#xff1b; 行為型模式 角色 發起人角色&#xff08;Originator&#xff09;&#xff1a;記錄當前時刻的內部狀態&#xff0c;負責定義哪些屬于備份范圍的狀態&#xf…

dll oem證書導入工具_技術干貨 | 惡意代碼分析之反射型DLL注入

歡迎各位添加微信號&#xff1a;qinchang_198231 加入安全 交流群 和大佬們一起交流安全技術01技術概要這是一種允許攻擊者從內存而非磁盤向指定進程注入DLL的技術&#xff0c;該技術比常規的DLL注入更為隱蔽&#xff0c;因為除了不需要磁盤上的實際DLL文件之外&#xff0c;它…

像程序員一樣思考_如何像程序員一樣思考-解決問題的經驗教訓

像程序員一樣思考by Richard Reis理查德里斯(Richard Reis) 如何像程序員一樣思考-解決問題的經驗教訓 (How to think like a programmer — lessons in problem solving) If you’re interested in programming, you may well have seen this quote before:如果您對編程感興趣…

CF908G New Year and Original Order 數位DP

傳送門 看到數據范圍到\(10^{700}\)毫無疑問數位DP。那么我們最重要的問題是如何有效地維護所有數位排序之后的數的值。 對于某一個數\(x\)&#xff0c;設\(f_{x,i} (i \in [1,9])\)表示\(x\)中的所有數位的值\(\geq i\)的數位數量&#xff0c;比如說\(f_{6345982 , 7} 2 , f_…

銳捷亮相GITC:請互聯網企業為我點個贊!

【51CTO.com原創稿件】GITC全球互聯網技術大會已成功舉辦四屆&#xff0c;今年的會議現場依然是摩肩接踵圍觀者眾。圍繞互聯網熱點技術&#xff0c;眾人根據云、大數據、安全、運維、基礎架構的不同主題&#xff0c;各自聚成小圈子展開深入交流。 銳捷的展位在主會場的內側&…