找回密码
 立即注册
软件工程 2022-04-28 212 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
第 20 讲我介绍了 HTTP 缓存控制,第 21 讲我介绍了 HTTP 代理服务。然后,将两者结合起来就是本课所说的“缓存代理”,它是一种支持缓存控制的代理服务。
之前讲缓存的时候,主要讲的是客户端(浏览器)上的缓存控制,可以减少响应时间,节省带宽,提升客户端的用户体验。
但是,在HTTP传输链路上,不仅客户端有缓存,服务器上的缓存也很有价值,使得请求不需要经过整个后续处理过程,得到响应结果”最近”。
尤其是那些“读多写少”的数据,比如爆款、热门产品详情页,一秒钟可能会有上千个请求。即使只缓存几秒,也能阻挡巨大的访问流量,让
RPS(每秒请求数)降低了几个数量级,降低了应用服务器的并发压力,性能显着提升。
HTTP的服务器缓存功能主要是通过代理服务器(即缓存代理)来实现的。虽然源服务器系统中经常会出现各种缓存(如Memcache、Redis、Varnish等),但与HTTP无关,这里暂且不提

(In lecture 20, I introduced HTTP cache control, and in lecture 21, I introduced HTTP proxy service. Then, the combination of the two is the "cache agent" in this lesson, which is a proxy service that supports cache control.When I talked about caching before, I mainly talked about the cache control on the client (browser), which can reduce the response time, save bandwidth and improve the user experience of the client.However, on the HTTP transmission chain, not only the client has cache, but also the cache on the server is very valuable, so that the request does not need to go through the whole subsequent processing process to get the "latest" response result.Especially those data that "read more and write less", such as popular models and popular product details pages, may have thousands of requests per second. Even if only caching for a few seconds, it can block huge access traffic and makeRPS (requests per second) is reduced by several orders of magnitude, which reduces the concurrency pressure of the application server and significantly improves the performance.The caching function of HTTP server is mainly realized through proxy server (i.e. caching proxy). Although various caches (such as Memcache, redis, varnish, etc.) often appear in the source server system, they have nothing to do with HTTP and are not mentioned here)

[下载]08420673505.rar




上一篇:良心中间商:HTTP的代理服务.pdf
下一篇:HTTPS是什么?SSL TLS又是什么?.pdf