金山面试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入门(一)