cs526 logo
rainbow animatio

Homework #4. Load Balancing a Cluster Using Apache Proxy Balancer and LVS DR

Goal:

Assignment Date: 3/21/2012
Due Day: 4/9/2012
Related documents:

Description:

Logistics:

Part 1. Clone cs526_LVSvApp for a set of four virtual machines.

Part 2. Setup a cluster based on Apache Load Balancer.
  1. Through the consoles of the virutal machines configure the these four virtual machines with your designated IP addresses. Modify the default web page to indicate the real server name and your loginname.
  2. Read  ubuntu apache setup and follow sample 3 of http://cs.uccs.edu/~cs526/apacheProxyBalancer.html to set up a cluster using lvs as a balancer and rs1, rs2A, rs3A as real servers in your LVSvApp. Note that there is 000-chowlb sites in /etc/apache2/sites-enabled that you need to modify for your load balancer cluster.
  3. Set the load balancing algorithm to be Pending Request Counting.
  4. Use ab to benchmark those three real web servers. Set their loadfactor number accordingly on the proxy for the best performance.
  5. Try to evaluate the cluster performance usig ab -c 20 -n 5000 http://<login>dip.csnet.uccs.edu. Discuss the observed performance.
  6. Note that the /var/www/ contains a benchmark directory. You can use it or create your own benchmark web pages.
  7. Make sure you power off the vApp after each session. They can be power off as a unit.
  8. After you finish the part2, you may want to consider remove 000-chowlb or even 001-default as <VirtualHost *:80> may catch requests for your vip.

Part 3. Setup a LVS DR cluster.

  1. For each virtual machine in the LVS DR cluster,
    1. cd /home/csnet/lvs and modify the script for the related role of the virutal machine by changing the vip, rip, dip numbers.
    2. Run the scripts to set up the LVS DR cluster (on lvs run lvs_dr.sh; on real servers, run rs_dr.sh).
  2. On lvs, decide what is a good schedule algorithm and weights for real servers to use for achieving the best web service performance. Same for the ssl terminal service.
  3. Generate 7 SSL terminal sessions. Capture the terminal session data on SSH Secure Shell Client or Putty that indicate which real servers are assigned to serve the requests. Briefly describe the pattern.
  4. Capture 7 web access sessions to the <login>vip.csnet.uccs.edu using lynx (a text based browser) on gandalf. Briefly describe the pattern.
  5. Save the above SSL/Web sessions results as .html files and reference them in your hw4.html.
  6. Try to evaluate the cluster performance using ab -c 20 -n 5000 http://<login>vip.csnet.uccs.edu. Discuss the observed performance and compared that with part 2.
  7. Make sure you power off the vApp after each session.

Questions.

  1. Besides the potential performance enhancement (debatable based on your observed performance at part 2), what are other advantages we should use apache load balancer?
  2. What are the observed LVS DR cluster performance and what performance you expected it to achieve? Provide an explanation on the difference.
  3. Given the availability of these two techniques, provide one example where you will definitely use apache load balancer and another example where you will definitely use LVS DR.
  4. From Part 2 to Part 3, while not disable apache load balancer, LVS-DR will still work (even apache load balancer is running). Explain why. Hint: http://cs.uccs.edu/~cs526/lvs/lvs.pptx#9. Note that as a good practice, you should disable and shutdown those server processes that are no longer needed.

Create a homework web page hw4.html in your cs526 personal web page directory. Email the url and anawers of the above questions to cchow@uccs.edu and aalmuray@uccs.edu with subject field "CS526 hw4".