high performance web server

49
High Performance Web Server NTUIM R89725018 Chen Pei- wen R89725013 Cheng Pei-c hun

Upload: cecilia-avila

Post on 30-Dec-2015

28 views

Category:

Documents


0 download

DESCRIPTION

High Performance Web Server. NTUIM R89725018 Chen Pei-wen R89725013 Cheng Pei-chun. Outline. Introduction Load balancing Content-based Switching Implementation Architecture Conclusion Reference. Introduction. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: High Performance Web Server

High Performance Web Server

NTUIM

R89725018 Chen Pei-wen

R89725013 Cheng Pei-chun

Page 2: High Performance Web Server

Outline

Introduction Load balancing Content-based Switching Implementation Architecture Conclusion Reference

Page 3: High Performance Web Server

Introduction

Performance and high availability are critical at web sites which receive large number of requests.

The QoS a web server provides to end users depends on– Network-transfer speed– Server-response time

Page 4: High Performance Web Server

Introduction(con’d)

Network-transfer speed is mainly a matter of Internet-link bandwidth.

Server-response time depends upon available resources:– Single server– Multiple servers

Page 5: High Performance Web Server

Introduction(con’d)

Single server

Hardware

Operation System

Web-server Software

Specific operation systemAdjust operation-system parameter

Well-designed server processAdjust web-server software

Install more RAM Replace the CPU with a faster oneUse faster SCSI controllers and disks

Page 6: High Performance Web Server

Introduction(con’d)

Multiple Servers– Improve performance by increasing the

number of Web servers.– This involves an attempt to distribute the

traffic onto a cluster of back-end Web servers.

– Load balancing is needed.

Page 7: High Performance Web Server

Load Balancing

Goal– To balance the traffic onto available server– The technical distribution is totally

transparent to the end user

Page 8: High Performance Web Server

Load Balancing(con’d)

Benefits– Improve reliability (fault tolerance)

• If you are using a single server and it fails, the site goes down with it.

• This is especially bad for e-commerce and financial sites which lose money if they are out of service.

• With a load balanced group of servers, loss of a single server will only slightly affect overall site performance and the site will not go down.

Page 9: High Performance Web Server

Load Balancing(con’d)

– Improve performance• Load balancing allows multiple servers to be available to

handle larger number of incoming client requests.

– Lower cost• With load balancing providing fault tolerance to the entire

site, the reliability of each individual server is less critical. • We can use lower-cost servers without compromising

overall reliability.

Page 10: High Performance Web Server

Load Balancing(con’d)

– Improve scalability and flexibility• With one server, all you can do if your traffic increases is

upgrade that server or buy a bigger one.• With load balanced groups of servers, you can simply

add more servers gracefully to server farm.

– Improve maintainability• The flexibility of a load balanced group of servers allows

you to remove individual servers from service for repair or upgrade without affecting the overall availability of the site.

Page 11: High Performance Web Server

Load Balancing(con’d)

Load balancing algorithm (RFC 2391)

1. Round-Robin• This is the simplest scheme, where a host is selected

simply on a round robin basis, without regard to load on the host.

2. Least Load first (session count)• the host with least number of sessions bound to it is

selected to service a new session.• Each session is assumed to be as resource consuming

as any other session

Page 12: High Performance Web Server

Load Balancing(con’d)

3. Least traffic first (bytes or packet count)• measure system load by tracking packet count or byte

count directed from or to each of the member hosts over a period of time.

4. Least weighted load • Weights to sessions, based on likely resource

consumption estimates of session types• Weights to hosts based on resource availability.

5. Fastest response • periodically ping member hosts and measure the

response time to determine how busy the hosts really are

Page 13: High Performance Web Server

Load Balancing - RR DNS

Round-Robin DNS Approach– Allows a single domain name to be associated wit

h several IP addresses • Example : using CNAME (canonical name) resource records

www.foo.dom. IN CNAME www1.foo.dom

IN CNAME www2.foo.dom

IN CNAME www3.foo.dom

IN CNAME www4.foo.dom

Page 14: High Performance Web Server

Load Balancing - RR DNS

Operation– A browser has to take to retrieve the URL is to resolve the c

orresponding IP address

– A name resolver that calls a nearby DNS server, which then actively iterates over the distributed DNS server hierarchy on the Internet until it reaches the Round-Robin DNS server, which finally gives the IP address

– A browser takes the IP address and create a connection with the assigned server

Page 15: High Performance Web Server

Load Balancing - RR DNS

Page 16: High Performance Web Server

Load Balancing - RR DNS

Attractiveness of Round-Robin DNS– The concept is simple– It requires no additional hardware

Drawbacks of Round-Robin DNS– DNS is unaware of the status of web servers– All servers are assumed to have equal capability

to offer all services

Page 17: High Performance Web Server

Load Balancing - RR DNS

– The caching of DNS data can cause load imbalances

• In practice, DNS servers cache the resolved data at any point in the DNS hierarchy both to decrease the resolver traffic and to speed up resolving.

User process

Nameresolver

NameServer

query

response

query

response

RR DNSServer

query

response

cache cache cache

Database Database

Page 18: High Performance Web Server

Load Balancing - L4 Switch

Layer-4 Switch Approach– These switches sit between the connection to the

Internet and the server farm

Page 19: High Performance Web Server

Load Balancing - L4 Switch

                 

                                                                  

Page 20: High Performance Web Server

Load Balancing - L4 Switch

Operation– The switch recognizes when a client is requesting a new

session by identifying the TCP SYN packet

– The request is forwarded to the best available server based on the configured load balancing algorithm

– The switch maintains a session-server binding table that associates each active session with the real server to which it is assigned

Page 21: High Performance Web Server

Load Balancing - L4 Switch

– It performs address substitution so that the real server will transparently receive packets for that session

– Likewise, the switch intercepts packets traveling from the real server to the client and performs the reverse address substitution

– The switch recognizes when the session is terminated by identifying the TCP FIN packet

– Then it removes the session-server binding from its binding table

Page 22: High Performance Web Server

Load Balancing - L4 Switch

Attractiveness of Layer-4 Switch– Good load balancing can be achieved– No problem of the caching of DNS data– Sophisticated algorithm can be used– Aware of the failures of web servers

Limitation of Layer-4 Switch– It has no concept of what content is being

requested

Page 23: High Performance Web Server

Load Balancing - L4 Switch

– All content should be replicated– Cache hit rate may be low

Page 24: High Performance Web Server

Load Balancing

Benefits of Content Awareness

Page 25: High Performance Web Server

Content-based Switching

Content-based Switching – Intelligently load balances traffic across delivery

nodes, dynamically directing specific content requests to the best site and server at that moment.

– Based on content availability, application availability and server load.

– Adds protection against flash crowds and ensures transaction continuity for e-commerce applications.

– Enables advanced personalization and prioritization for important content and customers.

Page 26: High Performance Web Server

Content-based Switching(con’d)

Benefits– Increased performance due to improved hit rates

in the back-end’s main memory caches.– Increased secondary storage scalability due to the

ability to partition the server’s database over the different back-end nodes

– The ability to back-end nodes that are specialized for certain types of requests

Page 27: High Performance Web Server

Content-based Switching(con’d)

Products– ArrowPoint's

Content Smart™ Web SwitchesWebNS™

– Foundry network’sServerIron™ Traffic Management system Internet IronWare™

– Nortel Networks’sAccelar Load Balancing Server Switch

Page 28: High Performance Web Server

Content-based Switching(con’d)

Switch Architecture

Page 29: High Performance Web Server

User makes a content request by typing a URL into a Browser.

Content-based Switching(con’d)

Idea

Web switch with virtual IP of the requested URL intercepts the request. Web switch spoofs TCP connect back to client and examines packet URLs. Simultaneously, the Web switch examines HTTP header and URL and compares to current content rules to select best server or cache to satisfy request.

A flow is created between the switch and the optimal server and "snaps" together with the flow from the client to the switch.

A flow control block is created in the port ASIC and all subsequent packets are forwarded without intervention by the switch controllers.

Page 30: High Performance Web Server

Content-based Switching(con’d)

Page 31: High Performance Web Server

Content-based Switching(con’d)

Page 32: High Performance Web Server

Content-based Switching(con’d)

Page 33: High Performance Web Server

Content-based Switching(con’d)

Variant Switching Scheme– URL Switching

Directs HTTP requests to a group of servers using information contained in URL string.

• Greater control over the website deployment to place different web content on different servers

• Eliminating unnecessary duplication of all content across all load-balanced servers.

• Ex: Different file typesDifferent request

Page 34: High Performance Web Server

Content-based Switching(con’d)

Variant Switching Scheme– Cookie Switching

Directs HTTP requests to a server group based on information embedded in a cookie in the HTTP header.

• Cookie specifies which server group should handle the request.

• Ensures that a particular server group always handles requests from a particular client even across sessions.

• Guarantee persistent end-user experience.• Ex: Personalized web page

Prioritized service

Page 35: High Performance Web Server

Content-based Switching(con’d)

Variant Switching Scheme– SSL Session ID Switching

All the SSL connections between a client and server must reach the same host.

• Ensures that all the traffic for a SSL transaction with a given SSL-ID always goes to the same server.

• Key feature for commerce, financial web sites• Ex: Prevent shopping cart loss

Access controlPrevent source address overload

Page 36: High Performance Web Server

Content-based Switching(con’d)

Load balancer evaluation criteria – Plans for Layer 3 or Layer 4 switching– Number of servers and planned growth – Type of content to be balanced – Number of server sites to be balanced – Sophistication of balancing algorithms– Degree of fault tolerance required – Interfaces and port density– Support requirements

Page 37: High Performance Web Server

Implementation Architecture

Design, Implementation and Performance of a

Content-Based Switch

Infocom 2000

{George Apostolopoulos, David Aubespin, Vinod Peris, Prashant Pradhan, Debanjan Saha}

Page 38: High Performance Web Server

Implementation Architecture(con’d)

– The Layer 5 system consist of a switch core to which a number of custom built intelligent port controller are attached.

– Layer 5 functions, such as the parsing of HTTP protocol messages and URL based routing, are performed by the processor.

Switch Architecture

Page 39: High Performance Web Server

Implementation Architecture(con’d)

– Port controller identify the packets that need to be handled by the processor and forward them to the processor.

– Make sure it can achieve very high speed while delivering sophisticated Layer 5 functionality.

Switch Architecture

Page 40: High Performance Web Server

Implementation Architecture(con’d)

– Phase 1: it intercepts the TCP connection setup request from the client and response by establishing a connection to the client.

– Phase 2:after routing decision is made, it sets up a second connection to the appropriate server node.

– Phase 3:splicing the two TCP connections

Operation Blueprint

Page 41: High Performance Web Server

Implementation Architecture(con’d)

Processing at Port Controllers

Page 42: High Performance Web Server

Implementation Architecture(con’d)

– CPU acts as the end-points for the TCP connections to the client and the server until. they are spliced.

– Splices the connection by sending the appropriate control messages to the port controllers.

– Handling of TCP options deserves special attention.

• Reject all TCP options• Enumerate the minimum set of options supported by all

nodes

Processing at CPU

Page 43: High Performance Web Server

Implementation Architecture(con’d)

To be able to dispatch HTTP requests based on URLs, the L5 system has to know mapping from the URL to the web server on which the page resides.

Use a hash function and set default size of all hash buckets to 256.

URL look up

Page 44: High Performance Web Server

Conclusion

The concept of content-based switching is understandable, but efforts are needed to implement it well.

Content based-service differentiation can be used to provide service differentiation based on the user profiles.

Not only load balancing but also persistence pays in E-Commerce.

Page 45: High Performance Web Server

Reference RFC 2391 LSNAT Webtechniques Load balancing your web sites

http://www.webtechniques.com/archives/1998/05/engelschall/ HydraWEB Load Balancing

http://www.hydraweb.com/load_balancing/index.asp Techniques for Designing High-Performance Web Sites

http://www.research.ibm.com/people/i/iyengar/ieeeic/ieeeic.html Locality-Aware Request Distribution in Cluster-based Network S

ervice In Architectural Support for Programming Languages and Operating System, 1998

TCP/IP & Related Protocols 2 edition Uyless BlackChapter four : The Domain Name System

Page 46: High Performance Web Server

Reference (con’d) Foundry Products Application Notes

http://www.foundrynet.com/appnotes.html Alteon WebSystems Web Switching White Paper

http://www.alteonwebsystems.com/products/whitepapers/index.asp Design, Implementation and Performance of a Content-Based S

witch Infocom 2000{George Apostolopoulos, David Aubespin, Vinod Peris, Prashant Pradhan, Debanjan Saha}

Cisco CDNshttp://www.cisco.com/warp/public/779/largeent/learn/technologies/content_networking/

Page 47: High Performance Web Server

URL Switching

Back

Page 48: High Performance Web Server

Cookie Switching

Back

Page 49: High Performance Web Server

SSL Session ID Switching

Back