TCP Splicing for URLaware Redirection Objectives q What
TCP Splicing for URL-aware Redirection Objectives q What is a layer-7 switch q Why content-aware switching q Difference between layer-4 and layer-7 routing q TCP splicing q Case studies Linux-based content aware switch v IBM Layer 5 v 1
Layer-7 switch q A layer-7 switch is also known as a URL- aware redirector or a content-smart switch q They all refer to “a switch having the capability to redirect HTTP requests based on the URL specified in the client’s GET request” v. As we know that there are two types of HTTP request message: GET and POST 2
Layer-7 switch (Cont. ) q HTTP GET message format: v ASCII (human-readable format) request line (GET, HEAD commands) GET /somedir/page. html HTTP/1. 1 Host: www. someschool. edu User-agent: Mozilla/4. 0 header Connection: close lines Accept-language: fr Carriage return, line feed indicates end of message 3
Content-aware Switch www. yahoo. com Internet Image Server IP TCP APP. DATA Application Server GET /cgi-bin/form HTTP/1. 1 Host: www. yahoo. com… Switch HTML Server • Front-end of a web cluster • Route packets based on layer 5/7 (content) information 4
Why use Context-aware Switching q Servers can be specialized for certain types of request v Content segregation q Exploit locality v Affinity-based routing v Increase the performance because of the improved hit rate q Partial replication of server file set v Partition the server’s file set over different nodes 5
Layer 4 vs. 7 Routing 6
Content-aware Switch Architecture q Two way architecture Both request and response pass through switch q One way architecture v Only the request passes through switch v Response goes directly to the client v Servers and switch may share a virtual IP (VIP) • Needs modification of ARP/ICMP 7
Content-aware Switch Architecture • Two way architecture Server returns the response to the switch client switch server • One way architecture Server returns the response to the client 8
Layer-7 Two-way Architecture 9
Layer-7 Two-way Mechanisms q TCP gateway An application level proxy running on the web switch mediates the communication between the client and the server user kernel q TCP splicing reduce the overhead in TCP gateway. Packet forwarding occurs at network level between the network interface driver and the TCP/IP stack, is carried out directly by OS user kernel 10
URL Parsing is expensive!! q Performing content-aware routing implies that some kind of string searching and matching algorithm is required v Such a time-consuming function is expensive in a heavy traffic web site q Experience showed that the system performance would be severely degraded if we implement some URL parsing functions in the distributor 11
TCP splicing q Once the two TCP connections are established, they are spliced v IP packets are forwarded at the network layer q TCP splicing requires v Connection binding v Packet analyzer to rewrite packets • Appropriate address translation • Sequence number modifications to be performed on the packets q Basically, we are deploying connection re-use 12
Operation of Content-aware Distributor 13
Functional Overview of Linux-based content aware switch 14
IBM Layer 5 Switch Architecture q Switch core q Port controller: v v Identify packets (layer 5) and send them to CPU Processing all other packets q CPU: Power. PC 603 e v v Parse http request URL based routing 15
Layer-7 one-way architecture 16
Layer-7 one-way mechanisms q TCP handoff The switch hands off the TCP connection endpoint to the server q TCP connection hop v Software-based proprietary solution v encapsulating the IP packet in an RPX packet and sending it to the server 17
Layer-7 one-way mechanisms q Migrate the created TCP connection from the switch to the back-end sever v v Create a TCP connection at the back-end without going through the TCP three-way handshake Retrieve the state of an established connection and destroy the connection without going through the normal message handshake required to close a TCP connection q Once the connection is handed off to the back-end server, the switch must forward packets from the client to the appropriate back-end server 18
TCP Splicing: Summary q Why URL-aware switching q Layer-4 versus layer-7 routing q TCP splicing q TCP gateway q Case studies v Linux-based content aware switch v IBM Layer 5 19
- Slides: 19