Title: Web Hosting
1Web Hosting
2Outline
- How different web site can be virtually hosted
on the same server, and how this affects HTTP - How to make web sites more reliable under heavy
traffic - How to make web site load faster
3Hosting services
4A Simple Example Dedicated Hosting
Irenes ISP
www.joes-hardware.com
Content
Joe
client
www.cajun-gifts.com
Internet
www.marys-antiques.com
Content
client
Mary
www.irenes-isp.com
5Virtual Hosting
6Virtual Hosting
Content
Irenes ISP
www.joes-hardware.com
Joe
www.marys-antiques.com
Content
Mary
client
www.cajun-gifts.com
Internet
client
www.irenes-isp.com
7Virtual server request lacks Host information
8Virtual Server Request Lacks Host Information
(A getting http//www.joes-hardware.com/index.html
)
www.voting-info.gov www.joes-hardware.com www.mary
s-antiques.com
GET /index.html HTTP/1.0 User-agent SuperBrowser
v1.3
Internet
Client A
/voting /mary /joe
GET /index.html HTTP/1.0 User-agent WebSurfer
2000
Client B
HTTP/1.0 requests do not contain hostname
information, so they do not support web servers
that host multiple web sites. (HTTP/1.1 supports
a Host header to fix this problem)
(B getting http//www.marys-antiques.com/index.htm
l)
9Making virtual hosting work
- Virtual hosting by URL path
- Virtual hosting by port number
- Virtual hosting by IP address
- Virtual hosting by Host header
10Virtual hosting by URL path
- http//www.joes-hardware.com/joe/index.html
- http//www.marys-antiques.com/mary/index.html
- The problem?
11Virtual hosting by port number
- Install multiple HTTP servers
- one listens 80
- one listens 81, and so on.
- The problem?
12Virtual hosting by IP address
- Multiple IPs are assigned to single computer.
- Different IP corresponds to different host.
- The problem?
13Virtual hosting by IP address
www.voting-info.gov209.172.34.2 www.joes-hardware
.com209.172.34.3 www.marys-antiques.com209.172.3
4.4
Dest IP address Directory 209.172.34.2
/voting 209.172.34.3
/joe 209.172.34.4 /mary
209.172.34.3
Client A
Internet
/voting /mary /joe
209.172.34.4
Client B
14Virtual hosting by Host header
- HTTP/1.1 solution
- Use single IP, single port to serve incoming HTTP
requests to different hosts.
15Virtual hosting by Host header
(A getting http//www.joes-hardware.com/index.html
)
www.voting-info.gov www.joes-hardware.com www.mary
s-antiques.com
GET /index.html HTTP/1.1 User-agent SuperBrowser
v1.3 Host www.joes-hardware.com
Internet
Client A
/voting /mary /joe
GET /index.html HTTP/1.1 User-agent WebSurfer
2000 Host marys-antiques.com
Client B
The HTTP Host header carries the hostname
information that would otherwise be lost in
normal server requests,allowing name-based
virtual hosting
(B getting http//www.marys-antiques.com/index.htm
l)
16HTTP/1.1 Host Headers
- Syntax and usage
- Missing Host headers
- Interpreting Host headers
- Host headers and proxies
17Making web sites reliable
- There are several times during which web sites
commonly break - Server downtime
- Traffic spikes
- Network outages or losses
- Some ways of anticipating and dealing with the
problems - Mirrored server farms
- Content distribution networks
18Mirrored server farms
- HTTP redirection
- DNS redirection
- Discussed in Chapter 20.
19Mirrored Server Farms
Client
Client
Replica origin server
Client
Internet
Switch
Master origin server
Client
Client
Replica origin servers
20Mirrored Server Farms (cont.)
New York Replica origin server
Chicago (HQ) Master origin server
Internet
Miami Replica origin server
Little Rock Replica origin server
21Content distribution networks
- Surrogate caches in CDNs
- Proxy caches in CDNs
22Proxy Caches in CDNs
Caching Proxy
Client
Internet and lots of origin servers
Client
Switch
Client
Client
23Making web sites faster
- Many of the technologies mentioned in the
previous slides also help web site load faster. - Server farms and distributed proxy caches or
surrogate servers distribute network traffic,
avoiding congestion. - Distributing the content brings it closer to end
users, so that the travel time from server to
client is lower. The key to speed of resource
access is how requests and responses are directed
from client to server and back across the
Internet. (see more details in next lectures,
redirection methods.) - Another approach to speeding up web sites is
encoding the content for fast transporting.
Namely, compressing the content. (see Transfer
Encoding and Chunked Encoding for details.)
24Reference
- http//www.ietf.org/rfc/rfc3040.txt
- RFC 3040, Internet Web Replication and
Caching Taxonomy, is a - reference for the vocabulary of web
replication and caching - applications.
- http//search.ietf.org/internet-drafts/draft-ietf-
cdi-request-routing-reqs-00.txt - Request-Routing Requirements for Content
Internetworking. - Apache The Definitive Guide
- Ben Laurie and Peter Lauire, OReilly
Associates, Inc. - This book describes how to run the open
source Apache web server.