Sunday, June 8, 2014

HTTP The Definitive Guide (Web Hosting)

Web Hosting
Hosting Services
A Simple Example: Dedicated Hosting
Virtual Hosting
Virtual Server Request Lacks Host Information
Making Virtual Hosting Work


Virtual hosting by URL path
In general, URL-based virtual hosting is a poor solution and seldom is used.

Virtual hosting by port number
Virtual hosting by IP address
A much better approach (in common use) is virtual IP addressing. Here, each virtual web site gets one or more unique IP addresses. The IP addresses for all of the virtual web sites are attached to the same shared server. The server can look up the destination IP address of the HTTP connection and use that to determine what web site the client thinks it is connected to.
Virtual IP hosting works, but it causes some difficulties, especially for large hosters:

  • Computer systems usually have a limit on how many virtual IP addresses can be bound to a machine. Hosters that want hundreds or thousands of virtual sites to be hosted on a shared server may be out of luck.
  • IP addresses are a scarce commodity. Hosters with many virtual sites might not be able to obtain enough virtual IP addresses for the hosted web sites.
  • The IP address shortage is made worse when hosters replicate their servers for additional capacity. Different virtual IP addresses may be needed on each replicated server, depending on the load-balancing architecture, so the number of IP addresses needed can multiply by the number of replicated servers.


Virtual hosting by Host header


HTTP/1.1 Host Headers
Syntax and usage
Interpreting Host headers
Host headers and proxies

Making Web Sites Reliable
There are several times during which web sites commonly break:

  • Server downtime
  • Traffic spikes: suddenly everyone wants to see a particular news broadcast or rush to a sale. Sudden spikes can overload a web server, slowing it down or stopping it completely.
  • Network outages or losses

Mirrored Server Farms
A server farm is a bank of identically configured web servers that can cover for each other. The content on each server in the farm can be mirrored, so that if one has a problem, another can fill in.



In the Figure 18-7 scenario, there are a couple of ways that client requests would be directed to a particular server:
  • HTTP redirection - The URL for the content could resolve to the IP address of the master server, which could then send redirects to replica servers.
  • DNS redirection - The URL for the content could resolve to four IP addresses, and the DNS server could choose the IP address that it sends to clients.
Content Distribution Networks
A content distribution network (CDN) is simply a network whose purpose is the distribution of specific content. The nodes of the network can be web servers, surrogates, or proxy caches.

Surrogate Caches in CDNs
Proxy Caches in CDNs

Making Web Sites Fast







































































No comments:

Post a Comment