slides in ppt
TRANSCRIPT
![Page 1: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/1.jpg)
Implementing a Load-balanced Web Server System
![Page 2: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/2.jpg)
Architecture of A Cluster-based Web System
Courtesy: IBM Research Report, The state of the art in the locally distributed Web Server systems.
![Page 3: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/3.jpg)
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
req
uest
s
![Page 4: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/4.jpg)
Our Web Server Cluster
The whole web server only provides one visible web address to the outside world.
Each Web Server is able to provide two kinds of web services.
The load distributor distributes the incoming requests among the servers according to either content-aware or content-unaware load balancing strategies.
![Page 5: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/5.jpg)
Tasks to do to set up the system
Building up the web services on the servers File Services Video-on-demand Services Database Services
Implementing the load distributor on the frond-end node Content aware request distribution Content unaware request distribution
![Page 6: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/6.jpg)
Building Up the Web Services
File service Built on top of Apache server. File set is generated by SPECWEB99.
Video-On-Demand Real MPEG2 movies are stored in a specific directory
on the Apache server. Client video streaming software (VideoLan) is installed
and automatically launched by the Apache server.
Database service Built on top of Apache and MySQL.
![Page 7: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/7.jpg)
Video On Demand Service
VideoLAN project (Open Source Media Streaming Solution)
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.
Client-server Architecture Server streams MPEG-1, MPEG-2 and MPEG-4 / DivX
files, DVDs and live videos on the network in unicast or multicast.
Client receives, decodes and displays MPEG stream.
![Page 8: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/8.jpg)
VideoLan System
![Page 9: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/9.jpg)
Building Up Video-On-Demand Service in Our Web Server
VideoLan client-server software is installed
Server can stream movies to the client in realtime through UDP/RTP or HTTP/TCP
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.
![Page 10: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/10.jpg)
Load Balancing Schemes
Content Unaware Scheme Choose a server before receiving the URL
request Round Robin
Content Aware Schemes Choose a server to dispatch a request after
receiving and looking at the URL request Balance load according to different URL
request For database service — Database Server For video-on-demand service — Multimedia Server For file service — Round Robin
![Page 11: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/11.jpg)
Implementing the Load Distributor
Install the TCPSP 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.
Write the Distributor program in C language Two load balancing strategies are implemented The installed kernel module TCPSP is invoked to
perform TCP splicing
Run the distributor program in the application level
![Page 12: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/12.jpg)
Flow Chart of the Load Distributor(content aware)
Establish a TCP connection with the
chosen serverSplice 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
Distributor
Child Process
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
![Page 13: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/13.jpg)
Flow Chart of the Load Distributor(content unaware)
Establish a TCP connection with the
chosen server
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
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
Distributor
Child Process
![Page 14: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/14.jpg)
Comparison with Gage
Gage : A QoS Aware Web Server System “Performance Guarantees for Cluster-Based
Internet Services”, Chang Li, State University of New York at Stony Brook.
The load distributor is implemented as a kernel module. It is faster but can only implement content-unaware load balancing.
Gage doesn’t provide a variety of web services.
![Page 15: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/15.jpg)
Planned Performance Measurement
Let all servers provide file service, use SPECWEB99 to test the performance of the cluster-based file server.
Compare the time taken to service a Database request through the load distributor with that without the load distributor.
Compare the time taken to service a Database request through the load distributor with that without the load distributor.
![Page 16: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/16.jpg)
SPECWEB99
![Page 17: slides in ppt](https://reader034.vdocuments.us/reader034/viewer/2022051314/5563af20d8b42aae0d8b564f/html5/thumbnails/17.jpg)
Let’s go to the lab to see DEMO!