1 / 13

CMPN 385

CMPN 385. Lecture 1.1 Web Server Redirection. Web Server Redirection. Web Server Redirection generally means that the server receiving an HTTP request does not actually serve that request, but instead redirects the client to another server.

quasim
Télécharger la présentation

CMPN 385

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMPN 385 Lecture 1.1 Web Server Redirection

  2. Web Server Redirection • Web Server Redirection generally means that the server receiving an HTTP request does not actually serve that request, but instead redirects the client to another server. • Redirection is primarily needed for Load Balancing. For popular websites, it is not possible for a single machine to serve all the requests. • Several servers are in operation simultaneously, sharing the load. • Redirection is also needed if the website has been shifted.

  3. Two Components • Where to redirect: There are many servers which can serve the request. This component involves deciding which server to use for a request. • How to redirect: Once a server is chosen, this involves how to do the redirection. Redirection can be done at various levels: • Application level, using HTTP redirect • IP level • MAC level • Using DNS

  4. Client Side Approaches • Responsibility of client (browser) to choose a server out of the available mirrors. • Earlier, netscape had several servers names www1, www2, www3, ... • Responsibility of Netscape browser to randomly choose which one user accessed www.netscape.com. • This approach is not useful because it is not scalable.

  5. Smart Client Approach • Client downloads applet from server. • The applet decides which mirror to use for requests.

  6. Disadvantages of Client Approaches • It requires specific server side information like which server replicas(mirrors) are there, what parameter to use for decision and the value of that parameter for the replicas. Using a dynamic parameter like server load is not possible, because tracking it will have huge overhead.

  7. DNS- based approaches • There is a single name used for the website. The client will ask DNS server for the IP address of the server. At that time, DNS server can choose an appropriate mirror and return its IP address. All mirrors have different IP addresses.

  8. Disadvantages of DNS Approach • The major problem with this approach is caching. The DNS responses are cached by intermediate DNS servers and by the client also. So for the time a response is cached, all the requests using that will go to the same mirror. As a result, that mirror may get overloaded. So this allows only a coarse grained redirection. The authority name server has only a limited control over caching. Setting a low TTL(time to live) in the DNS response does not help because an intermediate name server may refuse to accept response having TTL below a certain threshold. • Another obvious disadvantage is that it increases the load on DNS server.

  9. Two Algorithms • Constant-TTL DNS Redirection • Round Robin • Server-state based algorithm • Client-state based algorithm • Combination of client-state and server-state • Adaptive-TTL DNS Redirection

  10. Dispatcher-based approaches • There is a central server called dispatcher which receives all the requests and then redirects the requests to appropriate server replicas. The dispatcher has a single IP address and identifies individual servers through some other address. In this approach also, there can be redirection at different levels. The possibilities depend on whether all replicas are on a LAN or are spread on a WAN.

  11. Schemes • Packet single rewriting – works when all replicas are on the same LAN • Packet double rewriting – similar to packet single rewriting, except that the reply of selected mirror has its own IP address as the source address • Packet forwarding – no change is made to the IP packet • HTTP redirection – dispatcher sends back an HTTP redirect reply with URL of selected mirror

  12. Server-based approaches • One of the mirrors, on getting an HTTP request, may decide to redirect the client to another mirror. Again, the redirection may happen at different levels: IP level with packet rewriting or at HTTP level. But it is generally done at the HTTP level. This approach is used along with another approach like DNS-based redirection. DNS-based redirection provides coarse grained redirection and this approach provides the fine-grained redirection if required.

  13. Comparison of approaches The choice for a mirror can be based on various criterion. Two common ones are network bandwidth and server load. Network bandwidth is not generally the bottleneck these days, so server load is a more important consideration.

More Related