Implementing a Load-balanced Web Server System
Architecture of A Cluster-based Web System Courtesy: IBM Research Report, The state of the art in the locally distributed ...
Architecture of Our Web Server Cluster Web Server 1 File Service Database Service Web Server 2 File Service Video-On-Deman...
Our Web Server Cluster <ul><li>The whole web server only provides one visible web address to the outside world. </li></ul>...
Tasks to do to set up the system <ul><li>Building up the web services on the servers </li></ul><ul><ul><li>File Services <...
Building Up the Web Services <ul><li>File service  </li></ul><ul><ul><li>Built on top of Apache server.  </li></ul></ul><u...
Video On Demand Service  <ul><li>VideoLAN project (Open Source Media Streaming Solution) </li></ul><ul><ul><li>Targeting m...
VideoLan System
Building Up Video-On-Demand Service in Our Web Server <ul><li>VideoLan client-server software is installed </li></ul><ul><...
Load Balancing Schemes <ul><li>Content Unaware Scheme  </li></ul><ul><ul><li>Choose a server before receiving the URL requ...
 Implementing the Load Distributor <ul><li>Install  the TCPSP  </li></ul><ul><ul><li>The tcp splicing is a technique to sp...
Flow Chart of the Load Distributor (content aware) Distributor Child Process Establish a TCP connection with the chosen se...
Flow Chart of the Load Distributor (content unaware) Listen for incoming connections on port 8888 Accept the connection Ch...
Comparison with Gage <ul><li>Gage : A QoS Aware Web Server System </li></ul><ul><ul><li>“ Performance Guarantees for Clust...
Planned Performance Measurement <ul><li>Let all servers provide file service, use SPECWEB99 to test the performance of the...
SPECWEB99
Let’s go to the lab to see DEMO!
Upcoming SlideShare
Loading in …5
×

slides in ppt

344 views
274 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
344
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

slides in ppt

  1. 1. Implementing a Load-balanced Web Server System
  2. 2. Architecture of A Cluster-based Web System Courtesy: IBM Research Report, The state of the art in the locally distributed Web Server systems.
  3. 3. Architecture of Our Web Server Cluster Web Server 1 File Service Database Service Web Server 2 File Service Video-On-Demand Load Distributor (grid1.cs.ucr.edu) http requests http requests
  4. 4. Our Web Server Cluster <ul><li>The whole web server only provides one visible web address to the outside world. </li></ul><ul><li>Each Web Server is able to provide two kinds of web services. </li></ul><ul><li>The load distributor distributes the incoming requests among the servers according to either content-aware or content-unaware load balancing strategies. </li></ul>
  5. 5. Tasks to do to set up the system <ul><li>Building up the web services on the servers </li></ul><ul><ul><li>File Services </li></ul></ul><ul><ul><li>Video-on-demand Services </li></ul></ul><ul><ul><li>Database Services </li></ul></ul><ul><li>Implementing the load distributor on the frond-end node </li></ul><ul><ul><li>Content aware request distribution </li></ul></ul><ul><ul><li>Content unaware request distribution </li></ul></ul>
  6. 6. Building Up the Web Services <ul><li>File service </li></ul><ul><ul><li>Built on top of Apache server. </li></ul></ul><ul><ul><li>File set is generated by SPECWEB99. </li></ul></ul><ul><li>Video-On-Demand </li></ul><ul><ul><li>Real MPEG2 movies are stored in a specific directory on the Apache server. </li></ul></ul><ul><ul><li>Client video streaming software (VideoLan) is installed and automatically launched by the Apache server. </li></ul></ul><ul><li>Database service </li></ul><ul><ul><li>Built on top of Apache and MySQL. </li></ul></ul>
  7. 7. Video On Demand Service <ul><li>VideoLAN project (Open Source Media Streaming Solution) </li></ul><ul><ul><li>Targeting multimedia streaming of MPEG-1 , MPEG-2 , MPEG-4 and DivX files, DVDs , digital satellite channels, digital terrestial television channels and live videos on a high-bandwidth IPv4 or IPv6 network in unicast or multicast . </li></ul></ul><ul><li>Client-server Architecture </li></ul><ul><ul><li>Server streams MPEG-1, MPEG-2 and MPEG-4 / DivX files, DVDs and live videos on the network in unicast or multicast. </li></ul></ul><ul><ul><li>Client receives, decodes and displays MPEG stream. </li></ul></ul>
  8. 8. VideoLan System
  9. 9. Building Up Video-On-Demand Service in Our Web Server <ul><li>VideoLan client-server software is installed </li></ul><ul><li>Server can stream movies to the client in realtime through UDP/RTP or HTTP/TCP </li></ul><ul><li>For video-on-demand service using HTTP/TCP, only the client is needed. The client software (vlc) is automatically launched once the Apache server detects that it is a video file. </li></ul>
  10. 10. Load Balancing Schemes <ul><li>Content Unaware Scheme </li></ul><ul><ul><li>Choose a server before receiving the URL request </li></ul></ul><ul><ul><li>Round Robin </li></ul></ul><ul><li>Content Aware Schemes </li></ul><ul><ul><li>Choose a server to dispatch a request after receiving and looking at the URL request </li></ul></ul><ul><ul><li>Balance load according to different URL request </li></ul></ul><ul><ul><ul><li>For database service — Database Server </li></ul></ul></ul><ul><ul><ul><li>For video-on-demand service — Multimedia Server </li></ul></ul></ul><ul><ul><ul><li>For file service — Round Robin </li></ul></ul></ul>
  11. 11. Implementing the Load Distributor <ul><li>Install the TCPSP </li></ul><ul><ul><li>The tcp splicing is a technique to splice two connections inside the kernel, so that data relaying between the two connections can be run at near router speeds. </li></ul></ul><ul><li>Write the Distributor program in C language </li></ul><ul><ul><li>Two load balancing strategies are implemented </li></ul></ul><ul><ul><li>The installed kernel module TCPSP is invoked to perform TCP splicing </li></ul></ul><ul><li>Run the distributor program in the application level </li></ul>
  12. 12. Flow Chart of the Load Distributor (content aware) Distributor Child Process Establish a TCP connection with the chosen server Splice two TCP connections End Write the URL request to the second TCP connection Monitor the two TCP connections and close them when no more activities are going on Listen for incoming connections on port 8888 Accept the connection Choose a server according to the request type and load balancing scheme Create a child process to do further processing Read the URL request
  13. 13. Flow Chart of the Load Distributor (content unaware) Listen for incoming connections on port 8888 Accept the connection Choose a server according to the load balancing scheme Create a child process to do further processing Distributor Child Process Establish a TCP connection with the chosen server End Splice two TCP connections Read the URL request Write the URL request to the second TCP connection Monitor the two TCP connections and close them when no more activities are going on
  14. 14. Comparison with Gage <ul><li>Gage : A QoS Aware Web Server System </li></ul><ul><ul><li>“ Performance Guarantees for Cluster-Based Internet Services”, Chang Li, State University of New York at Stony Brook. </li></ul></ul><ul><li>The load distributor is implemented as a kernel module. It is faster but can only implement content-unaware load balancing. </li></ul><ul><li>Gage doesn’t provide a variety of web services. </li></ul>
  15. 15. Planned Performance Measurement <ul><li>Let all servers provide file service, use SPECWEB99 to test the performance of the cluster-based file server. </li></ul><ul><li>Compare the time taken to service a Database request through the load distributor with that without the load distributor. </li></ul><ul><li>Compare the time taken to service a Database request through the load distributor with that without the load distributor. </li></ul>
  16. 16. SPECWEB99
  17. 17. Let’s go to the lab to see DEMO!

×