计算机网络系列(9)之应用场景Large web server systems

来源:互联网 发布:淘宝飞猪靠谱吗 编辑:程序博客网 时间:2024/06/05 09:12

1. Large web server
A web system can run its server on multiple computers in order to provide more processing power and higher reliability.

1.1. Multiple-domain-name
A web site adopts multiple servers where each server is assigned a distinct domain name.

1.2. HTTP redirect
It means that one main server with a publicized URL and multiple web servers with private distinct URLs.

1.3. Round-robin domain name server
DNS uses a symbolic name (called domain name) to represent an IP address. A web site uses one domain name for N web servers with N respecive IP addresses.

1.4. Network address translation (NAT)
The computers use private IP addresses for internal communication. The computers share one public IP address for Internet external communication. An NAT router changes the private IP address to the public IP address and vice versa.

2. Questions
Q1: A web site adopts the HTTP redirect method. It has one main server and two web servers. Suppose two browsers access this web site one after the other, and the main server selects the web servers in a round robin manner. Draw a diagram to show the sequences that HTTP messages are exchanged.

这里写图片描述

Q2: A web site adopts the round robin DNS method. It has one DNS server and two web servers. Suppose two browsers access this web site one after the other, they have to resolve the domain name into the corresponding IP address, and the DNS server selects the web servers in a round robin manner. Draw a diagram to show the sequence that DNS messages and the HTTP messages are exchanged.

这里写图片描述

Q3: Consider the following methods:
- Multiple-domain-name
- Http redirect
- Round robin DNS
- Network address translation

case1: which methods would maintain only one single domain name of the web site?
HTTP redirect, Round robin DNS, Network address translation

case2: which methods could balance the load among the web servers?
Http redirect, Network address translation (NAT).
In particular, Round robin DNS cannot balance due to the caching strategies of DNS.

case3: when round robin DNS is used, different servers may have different load balance of DNS caching. Explain this phenomenon.
Round robin DNS cannot balance due to the caching strategies of DNS. DNS服务器是按照一定的层次结构组织的,本地DNS服务器会缓存已解析的域名到IP地址的映射,这会导致使用该DNS服务器的用户在一段时间内访问的是同一台Web服务器,导致Web服务器间的负载不均匀。此外,用户本地计算机也会缓存已解析的域名到IP地址的映射。当多个用户计算机都缓存了某个域名到IP地址的映射时,而这些用户又继续访问该域名下的网页,这时也会导致不同Web服务器间的负载分配不均匀。说人话就是:Browser 1 第一次经过main DNS server 解析出server 2的地址,然后该域名与server2的IP被缓存到本地,第二次访问的时候应该是去访问main DNS server解析域名连接server 1的没错吧,但是!!!!由于本地已经缓存了该DNS解析信息,第二次实际上是直接通过server 2的IP访问server 2了!———这就是所谓的DNS缓存导致Round-robin无法完美均衡的核心问题。

3. 总结
重点1:主要谈论大型网络服务器,之间如何设置对外访问前台,如何负载均衡地服务等。主要负载均衡的四种方式:多域名,Http重定向,Round-robin domain name server,Network address translation (NAT)

阅读全文
0 0
原创粉丝点击