Presentation is loading. Please wait.

Presentation is loading. Please wait.

12 Nov 07 CS 622 1 DHTTP: An Efficient and Cache- Friendly Transfer Protocol for the Web By Michael Rabinovich and Hua Wang Presented by Jerry Usery.

Similar presentations


Presentation on theme: "12 Nov 07 CS 622 1 DHTTP: An Efficient and Cache- Friendly Transfer Protocol for the Web By Michael Rabinovich and Hua Wang Presented by Jerry Usery."— Presentation transcript:

1 12 Nov 07 CS 622 1 DHTTP: An Efficient and Cache- Friendly Transfer Protocol for the Web By Michael Rabinovich and Hua Wang Presented by Jerry Usery

2 12 Nov 07 CS 622 2 Overview Introduction Introduction DHTTP protocol DHTTP protocol Implications of DHTTP Implications of DHTTP Server design Server design Performance analysis Performance analysis Future work Future work Summary Summary

3 12 Nov 07 CS 622 3 Introduction Two issues addressed Two issues addressed 1) Violation of end-to-end principle by interception caches (Web proxies) 1) Violation of end-to-end principle by interception caches (Web proxies) Impersonation of origin servers Impersonation of origin servers Web interactions may be disrupted Web interactions may be disrupted 2) Performance implications of client-initiated TCP (Transmission Control Protocol) as transport protocol 2) Performance implications of client-initiated TCP (Transmission Control Protocol) as transport protocol HTTP generally conceived as file transfer protocol HTTP generally conceived as file transfer protocol TCP connection overhead, persistence & pipelining TCP connection overhead, persistence & pipelining

4 12 Nov 07 CS 622 4 Introduction Interception Cache

5 12 Nov 07 CS 622 5 Introduction Performance Implications TCP connection overhead, persistence & pipelining penalties TCP connection overhead, persistence & pipelining penalties Persistent connections Persistent connections Degradation of throughput and increasing connections Degradation of throughput and increasing connections Pipelined transmissions Pipelined transmissions Server must maintain connections, send responses in order Server must maintain connections, send responses in order Head-of-line delays can occur with slow responses Head-of-line delays can occur with slow responses

6 12 Nov 07 CS 622 6 Introduction Main Ideas of DHTTP Two main ideas of DHTTP (Dual-Transport HTTP protocol) Two main ideas of DHTTP (Dual-Transport HTTP protocol) 1) Split Web traffic between UDP (User Datagram Protocol) and TCP 1) Split Web traffic between UDP (User Datagram Protocol) and TCP Client typically sends requests via UDP Client typically sends requests via UDP Server sends response via UDP or TCP Server sends response via UDP or TCP Response size Response size Network conditions Network conditions 2) Server establishes TCP connection to client 2) Server establishes TCP connection to client

7 12 Nov 07 CS 622 7 Introduction UDP vs TCP UDP use for short responses UDP use for short responses Reduced number of open server connections Reduced number of open server connections Reduced number of TCP connection setups Reduced number of TCP connection setups DHTTP benefits DHTTP benefits Improves client latency Improves client latency Fewer Web interactions wait for connections Fewer Web interactions wait for connections Increases server capacity Increases server capacity Servers manage fewer open connections Servers manage fewer open connections Remaining TCP connections reserved for larger objects Remaining TCP connections reserved for larger objects Improved utilization of TCP connections Improved utilization of TCP connections Ordering constraints of pipelining doesn’t exist Ordering constraints of pipelining doesn’t exist

8 12 Nov 07 CS 622 8 Introduction DHTTP Server-established TCP connections TCP connection client/server roles reversed TCP connection client/server roles reversed Some firewall implications (existing countermeasures suffice) Some firewall implications (existing countermeasures suffice) Benefits Benefits Retains end-to-end Internet principle Retains end-to-end Internet principle True interception cache IP address use True interception cache IP address use Allows arbitrary deployment of interception caches Allows arbitrary deployment of interception caches Server-initiated TCP reduces message round trips (even with initial UDP request) Server-initiated TCP reduces message round trips (even with initial UDP request) Message round trips decreases with UDP Message round trips decreases with UDP Bottleneck process removed (server-accepted TCP connections) Bottleneck process removed (server-accepted TCP connections)

9 12 Nov 07 CS 622 9 DHTTP Protocol Web clients and servers listen on two ports Web clients and servers listen on two ports One UDP, one TCP One UDP, one TCP Servers use well-known ports (or URL-specified) Servers use well-known ports (or URL-specified) Clients use ephemeral ports (short-lived, per download) Clients use ephemeral ports (short-lived, per download) Two channels exist between client and server Two channels exist between client and server UDP used for requests below 1460 bytes UDP used for requests below 1460 bytes Most HTTP requests met Most HTTP requests met Server opens TCP connection or reuses open one for larger messages Server opens TCP connection or reuses open one for larger messages If TCP request sent by client, server may use it If TCP request sent by client, server may use it

10 12 Nov 07 CS 622 10 DHTTP Protocol Message Exchange (a) HTTP (b) DHTTP over UDP (c) DHTTP over TCP

11 12 Nov 07 CS 622 11 DHTTP Protocol Message Format Description Response may arrive to client out of order Response may arrive to client out of order Client assigns request ID, then matches it Client assigns request ID, then matches it Client advises server of listening port numbers Client advises server of listening port numbers Channel’s source port number included in IP header already Channel’s source port number included in IP header already UDP request contains client’s TCP port number UDP request contains client’s TCP port number TCP request contains client’s UDP port number TCP request contains client’s UDP port number Flag field used for duplicate (resend) requests Flag field used for duplicate (resend) requests

12 12 Nov 07 CS 622 12 DHTTP Protocol Message Format (a) – Request (b) – Response

13 12 Nov 07 CS 622 13 DHTTP Protocol Reliability Reliability DHTTP stipulates that a client may resend UDP requests DHTTP stipulates that a client may resend UDP requests Lessens overhead Lessens overhead Fighting denial-of-service attacks beyond paper’s scope Fighting denial-of-service attacks beyond paper’s scope Nonidempotent (e-commerce, etc) requests Nonidempotent (e-commerce, etc) requests Delegated to TCP channel Delegated to TCP channel Congestion control Congestion control DHTTP responds to any resent client requests via TCP DHTTP responds to any resent client requests via TCP Aids packet loss issues Aids packet loss issues In congested Internet experiments, only 6% of responses sent via UDP In congested Internet experiments, only 6% of responses sent via UDP

14 12 Nov 07 CS 622 14 DHTTP Protocol Channel Selection/Algorithm Response size Response size Network condition Network condition Server maintains “fresh requests” and “resent requests” counters Server maintains “fresh requests” and “resent requests” counters Loss threshold parameter “L” (currently 1%) Loss threshold parameter “L” (currently 1%) Size threshold parameter “S” (1460 bytes, default) Size threshold parameter “S” (1460 bytes, default) Algorithm Algorithm 1) Choose TCP for all large responses, i.e., whose size exceeds S, as well as for all resent requests. 2) If the ratio of resent request counter to fresh request counter exceeds L, enter a “high-loss” mode, else enter a “low-loss” mode. 3) In the low-loss mode, choose UDP for all small responses, i.e., those below the size threshold S. 4) In the high-loss mode, choose TCP for the 1-L fraction of small responses and UDP for the remaining L small responses.

15 12 Nov 07 CS 622 15 DHTTP Implications DHTTP and Interception Caches DHTTP and Interception Caches DHTTP interception caches intercept UDP requests – TCP requests pass through DHTTP interception caches intercept UDP requests – TCP requests pass through Client is aware it speaks with cache Client is aware it speaks with cache Retains end-to-end principle (even with caching) Retains end-to-end principle (even with caching) DHTTP uses UDP channel for short requests DHTTP uses UDP channel for short requests Reduces TCP setup costs, connections, response time Reduces TCP setup costs, connections, response time DHTTP allows client or server to unilaterally close TCP connection DHTTP allows client or server to unilaterally close TCP connection Ensures no in-transit data exists Ensures no in-transit data exists

16 12 Nov 07 CS 622 16 DHTTP Implications Server Design Description Master process Master process Accepts incoming requests Accepts incoming requests Three threads Three threads ReadRequest thread ReadRequest thread Reads incoming UDP request, copies into global buffer Reads incoming UDP request, copies into global buffer PipeRequest thread PipeRequest thread Pipes global buffer requests to worker processes Pipes global buffer requests to worker processes Global buffer moves requests ASAP so UDP port buffer will not fill up, requests don’t get dropped Global buffer moves requests ASAP so UDP port buffer will not fill up, requests don’t get dropped Maintenance thread checks worker process status every second Maintenance thread checks worker process status every second If too few idle worker processes, it forks new ones If too few idle worker processes, it forks new ones If too many, it kills some If too many, it kills some

17 12 Nov 07 CS 622 17 DHTTP Implications Server Design Description Worker processes Worker processes Execute individual requests, respond to clients Execute individual requests, respond to clients Reads pipe requests, generates response, chooses UDP or TCP, sends response Reads pipe requests, generates response, chooses UDP or TCP, sends response If TCP connection chosen and one exists to client, it reuses it If TCP connection chosen and one exists to client, it reuses it One TCP connection per client, possibly many clients One TCP connection per client, possibly many clients Includes Timeout thread Includes Timeout thread Closes TCP connections idle > timeout period Closes TCP connections idle > timeout period

18 12 Nov 07 CS 622 18 DHTTP Implications Server Design Modified Apache 1.3.6 Web server

19 12 Nov 07 CS 622 19 Performance Analysis Three-pronged performance study Three-pronged performance study Trace-driven simulation Trace-driven simulation Measured number/utilization of TCP connections experienced by server (HTTP and DHTTP) Measured number/utilization of TCP connections experienced by server (HTTP and DHTTP) Benchmarked Apache HTTP/DHTTP servers with clients on same LAN Benchmarked Apache HTTP/DHTTP servers with clients on same LAN Compared peak performance and scalability Compared peak performance and scalability Tested both servers in WAN environment with congested Internet connection Tested both servers in WAN environment with congested Internet connection

20 12 Nov 07 CS 622 20 Performance Analysis Simulation Used access log from AT&T low-end hosting services Used access log from AT&T low-end hosting services Three month duration Three month duration Contained over 100 million accesses Contained over 100 million accesses Average response size of 13 K Average response size of 13 K Two threshold values used Two threshold values used 4 K, optimistic value for many small Web responses 4 K, optimistic value for many small Web responses 1460 bytes, conservative value, one Ethernet MTU (maximum transfer unit) 1460 bytes, conservative value, one Ethernet MTU (maximum transfer unit)

21 12 Nov 07 CS 622 21 Performance Analysis Simulation Number of TCP connections at a server with three connections per client

22 12 Nov 07 CS 622 22 Performance Analysis Simulation Connection utilization with three connections per client

23 12 Nov 07 CS 622 23 Performance Analysis Simulation Number of TCP connections at a server with one connection per client

24 12 Nov 07 CS 622 24 Performance Analysis Simulation Connection utilization with one connection per client

25 12 Nov 07 CS 622 25 Performance Analysis Prototyped Testing Results Apache performance (bottleneck at server) (a) Throughput with three connections per client (b) Latency with three connections per client

26 12 Nov 07 CS 622 26 Performance Analysis Prototyped Testing Results Apache performance (bottleneck at server) (c) Throughput with one connection per client (d) Latency with one connection per client

27 12 Nov 07 CS 622 27 Performance Analysis Prototyped Testing Results DHTTP server performance (bottleneck at server) (a) Throughput with three connections per client (b) Latency with three connections per client

28 12 Nov 07 CS 622 28 Performance Analysis Prototyped Testing Results DHTTP server performance (bottleneck at server) (c) Throughput with one connection per client (d) Latency with one connection per client

29 12 Nov 07 CS 622 29 Performance Analysis Performance Comparison Comparison of Apache and DHTTP servers (a) Throughput (b) Latency

30 12 Nov 07 CS 622 30 Performance Analysis Performance Comparison Apache and DHTTP server performance under network congestion (a) Throughput (b) Latency

31 12 Nov 07 CS 622 31 Performance Analysis Performance Comparison Effectiveness of congestion detection in DHTTP server

32 12 Nov 07 CS 622 32 Future Work Dividing response among several UDP packets Dividing response among several UDP packets Likely allows higher size thresholds Likely allows higher size thresholds Building native support for nonidempotent requests Building native support for nonidempotent requests Investigation of finer algorithms that track network conditions at the client and/or subnet Investigation of finer algorithms that track network conditions at the client and/or subnet Dynamic policies for size threshold selection Dynamic policies for size threshold selection High-loss vs low-loss environments High-loss vs low-loss environments

33 12 Nov 07 CS 622 33 Summary Introduction Introduction DHTTP protocol DHTTP protocol Implications of DHTTP Implications of DHTTP Server design Server design Performance analysis Performance analysis Future work Future work Summary Summary


Download ppt "12 Nov 07 CS 622 1 DHTTP: An Efficient and Cache- Friendly Transfer Protocol for the Web By Michael Rabinovich and Hua Wang Presented by Jerry Usery."

Similar presentations


Ads by Google