金山面试CDN
History
今天去金山網絡面試的時候,被問到性能優化,我說了幾個。最后說到了CDN,我說要盡量把靜態的內容放置到CDN,可是為什么呢?面試官說既然你說到CDN。你就說說它的原理。
之前有看過,可是忘記差點兒相同了。
Summary
按我個人理解來說它是遵循就近原則,給用戶找到近期的server來提供用戶的靜態內容,比方CSS文件、圖像等,來提高用戶訪問站點的響應速度。
A content delivery network (CDN) is a system of distributed servers (network) that deliver webpages and other Web content to a user based on the geographic locations of the user, the origin of the webpage and a content delivery server.This service is effective in speeding the delivery of content of websites with high traffic and websites that have global reach. The closer the CDN server is to the user geographically, the faster the content will be delivered to the user. CDNs also provide protection from large surges in traffic.上面說了內容分發網絡是基于用戶的地理位置、網頁的源地址還有就是一個內容分發server。距離CDNserver越近的用戶。就能越快地獲取到靜態內容
description
有比較才有感覺到差別!
1 傳統訪問頁面方式簡單來說就是:
假設CPU每次運算一下就要去內存獲取數據的話,那么計算機的效率太低了。
這樣子的話。我們設置緩存。可以緩沖兩者速度不匹配而導致的效率問題。所以CPU要訪問數據。先到緩存中找,找不到就去內存中找,然后在緩存中加入相應的數據。下次要訪問改數據就直接到緩存中找即可了。
references
內容分發網絡百度百科總結
- 上一篇: 2015华为(北京)架构师创意课程大纲
- 下一篇: Btrfs入门(一)