Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Hosting Herng-Yow Chen. Outline How different web site can be “ virtually hosted ” on the same server, and how this affects HTTP How to make web sites.

Similar presentations


Presentation on theme: "Web Hosting Herng-Yow Chen. Outline How different web site can be “ virtually hosted ” on the same server, and how this affects HTTP How to make web sites."— Presentation transcript:

1 Web Hosting Herng-Yow Chen

2 Outline 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

3 Hosting services

4 A Simple Example : Dedicated Hosting client Internet Irene ’ s ISP www.joes-hardware.com www.cajun-gifts.com www.marys-antiques.com www.irenes-isp.com Content Mary Joe

5 Virtual Hosting

6 client Internet Irene ’ s ISP www.joes-hardware.com www.cajun-gifts.com www.marys-antiques.com www.irenes-isp.com Content Mary Joe

7 Virtual server request lacks Host information

8 Virtual Server Request Lacks Host Information Client A Client B Internet (A getting http://www.joes-hardware.com/index.html) GET /index.html HTTP/1.0 User-agent: SuperBrowser v1.3 www.voting-info.gov www.joes-hardware.com www.marys-antiques.com GET /index.html HTTP/1.0 User-agent: WebSurfer 2000 (B getting http://www.marys-antiques.com/index.html) 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) /voting /mary /joe

9 Making virtual hosting work Virtual hosting by URL path Virtual hosting by port number Virtual hosting by IP address Virtual hosting by Host header

10 Virtual hosting by URL path http://www.joes-hardware.com/joe/index.html http://www.marys-antiques.com/mary/index.html The problem?

11 Virtual hosting by port number Install multiple HTTP servers one listens 80 one listens 81, and so on. The problem?

12 Virtual hosting by IP address Multiple IPs are assigned to single computer. Different IP corresponds to different host. The problem?

13 Virtual hosting by IP address Client A Client B Internet /voting /mary /joe www.voting-info.gov=209.172.34.2 www.joes-hardware.com=209.172.34.3 www.marys-antiques.com=209.172.34.4 209.172.34.3 209.172.34.4 Dest IP address Directory 209.172.34.2 /voting 209.172.34.3 /joe 209.172.34.4 /mary

14 Virtual hosting by Host header HTTP/1.1 solution Use single IP, single port to serve incoming HTTP requests to different hosts.

15 Virtual hosting by Host header Client A Client B Internet (A getting http://www.joes-hardware.com/index.html) GET /index.html HTTP/1.1 User-agent: SuperBrowser v1.3 Host: www.joes-hardware.com www.voting-info.gov www.joes-hardware.com www.marys-antiques.com GET /index.html HTTP/1.1 User-agent: WebSurfer 2000 Host: marys-antiques.com (B getting http://www.marys-antiques.com/index.html) The HTTP Host header carries the hostname information that would otherwise be lost in normal server requests,allowing name-based virtual hosting /voting /mary /joe

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

17 Making 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

18 Mirrored server farms HTTP redirection DNS redirection Discussed in Chapter 20.

19 Mirrored Server Farms Client Internet Replica origin server Master origin server Replica origin servers Switch

20 Mirrored Server Farms (cont.) New York Replica origin server Chicago (HQ) Master origin server Miami Replica origin server Little Rock Replica origin server Internet

21 Content distribution networks Surrogate caches in CDNs Proxy caches in CDNs

22 Proxy Caches in CDNs Client Internet and lots of origin servers Caching Proxy Switch

23 Making 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.)

24 Reference 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 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, O ’ Reilly & Associates, Inc. This book describes how to run the open source Apache web server.


Download ppt "Web Hosting Herng-Yow Chen. Outline How different web site can be “ virtually hosted ” on the same server, and how this affects HTTP How to make web sites."

Similar presentations


Ads by Google