浏览器输入URL后会发生什么

Reference

[1] http://weibo.com/p/1001603820890600125943

Overview

1. 客户端本地向DNS服务器请求把URL转换为IP地址
2. 从客户端到服务器IP建立一个TCP连接
3. 若需要加密,则需要SSL/TLS握手,其中涉及到CA
4. 由客户端向服务器发起HTTP请求
5. 服务器dump出内容,及HTTP response发送回客户端

Details

服务器
1. reverse proxy: 
  • act as load balancer; 
  • it will be placed to be closed to clients to reduce the latency
  • it will more I/O consuming, not CPU consuming
2. 前端服务器
  • 用来跑网页中的一小部分
  • 前面那层前端一般用来组合这些pagelets
  • 目的: 快!
3. 后端
  • 用户数据
  • 缓存,memcached, not persistent, fast!
4. CDN
  • 用来存储图片,视频等大量资源
  • 需要靠用户近,以此提速
  • 著名CDN:Akamai

Leave a Reply