Blackboard Proxy Server w/ Mod_PageSpeed

The good news about Blackboard 9.1 is the use of AJAX. The bad news is that it hsan’t been optimization for slow internet connections.  The code needs some serious minification. How much? Lets just say the log-in page’s size can drop from 800KB to 300KB. That is some serious savings.

It is so bad that a user on the least expensive DSL needs to wait 60 seconds or more for the front page of Blackboard to download with images turn off in the browser.

Worse out of the box gzip encoding over HTTPS does not work. (Need to wait till 2012 for that to be fixed.) Wrap it all up and your providing your off-site clients pretty poor performance no matter what type of hardware your throw at it.

How do we resolve the problem? Add a simple proxy server like Ziproxy? Sure, but it is full of limitations. So lets just build one using Apache 2.2 and a nifty plug-in called mod_pagespeed. Whats great about Apache 2.2 is that it also can also provide load balancing.

Setup is a breeze, install a fresh copy of RHEL5/RHEL6 on a virtual machine making sure to install httpd and mod_ssl.

  1. Download and install the rpm version of mod_pagespeed
  2. Install httpd and mod_ssl
  3. Create and install a signed certificate
  4. Create the /etc/httpd/conf.d/blackboard.conf
  5. Enable mod_pagespeed in /etc/httpd/conf.d/pagespeed.conf
  6. mkdir /var/cache/mod_proxy
  7. Make Apache startup by default chkconfig httpd on
  8. Restart Apache 2.2
  9. Enjoy improved performance by openning blackboard through the host name of the new server. Once you know it works redirect your DNS to point to the new box.
# BLACKBOARD CONFIGURATION (blackboard.conf)
SSLProxyEngine On
ServerName {BLACKBOARD URL}:443
ServerAlias {BLACKBOARD URL}
DocumentRoot /var/www/docs
# Error Documents
ErrorDocument 404 /common/error404.html
ErrorDocument 500 /common/error500.html
ErrorDocument 502 /common/error502.html
ErrorDocument 503 https://{URL TO SEND USERS WHEN BB FAILS}
# Deflate Settings
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xslt+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xml-dtd
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript
SetEnvIfNoCase Request_URI (?:zip)$ no-gzip dont-vary
# Sane keep alive settings
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
# Glboal Proxy Settings
ProxyRequests Off
ProxyPreserveHost On
ProxyVia On
CacheEnable disk /
CacheRoot "/var/cache/mod_proxy"
httpCluster>
#### PROD CONFIGURATION ####
BalancerMember https://{APPSERVER1} route=app1 retry=15
alancerMember https://{APPSERVER2} route=app2 retry=15
#### START LOAD BALANCER CONFIGURATION ####
ProxySet lbmethod=bytraffic
ProxySet stickysession=ROUTEID
ProxySet nofailover=Off
#### END LOAD BANACER CONFIGURATION ####
</Proxy>
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
# Only send the good stuff to blackboard. After updates which modify the httpd.conf of blackboard we need to sync this up. (I will upload a sed script which does it)
ProxyPassmatch          ^/webapps/portal/UpTest_SSL.html !
ProxyPassmatch          ^/webapps/portal/UpTest.html !
RedirectMatch         ^/$               /index.html
# Copy JKMount to ProxyPassMatch
#ProxyPassMatch       ^/$                         balancer://httpCluster stickysession=ROUTEID  nofailover=Off lbmethod=bytraffic
ProxyPassMatch       ^/index.html                 balancer://httpCluster nocanon
ProxyPassMatch       ^/webapps/*                  balancer://httpCluster nocanon
ProxyPassMatch       ^/courses/*                  balancer://httpCluster nocanon
ProxyPassMatch       ^/@@/*                       balancer://httpCluster nocanon
ProxyPassMatch       ^/sessions/*                 balancer://httpCluster nocanon
ProxyPassMatch       ^/systemdata/*               balancer://httpCluster nocanon
ProxyPassMatch       ^/reportbranding/*           balancer://httpCluster nocanon
ProxyPassMatch       ^/reports/*                  balancer://httpCluster nocanon
ProxyPassMatch       ^/bbcswebdav/*               balancer://httpCluster nocanon
ProxyPassMatch       ^/bbcswebdav                 balancer://httpCluster nocanon
ProxyPassMatch       ^/images/*                   balancer://httpCluster nocanon
ProxyPassMatch       ^/modules/*                  balancer://httpCluster nocanon
ProxyPassMatch       ^/branding/*                 balancer://httpCluster nocanon
ProxyPassMatch       ^/sponsors/*                 balancer://httpCluster nocanon
ProxyPassMatch       ^/ecommerce/product/*        balancer://httpCluster nocanon
ProxyPassMatch       ^/course_image_main_images/* balancer://httpCluster nocanon
ProxyPassMatch       ^/course_image_2_images/*    balancer://httpCluster nocanon
ProxyPassMatch       ^/course_image_nav_images/*  balancer://httpCluster nocanon
ProxyPassMatch       ^/org_image_main_images/*    balancer://httpCluster nocanon
ProxyPassMatch       ^/org_image_2_images/*       balancer://httpCluster nocanon
ProxyPassMatch       ^/org_image_nav_images/*     balancer://httpCluster nocanon
ProxyPassMatch       ^/avatar/*                   balancer://httpCluster nocanon
ProxyPassMatch       ^/caliper/*                  balancer://httpCluster nocanon
ProxyPassMatch       ^/deployment/*               balancer://httpCluster nocanon
ProxyPassMatch       ^/content_area/*             balancer://httpCluster nocanon
ProxyPassMatch       ^/evidence_area/*            balancer://httpCluster nocanon
ProxyPassMatch       ^/portfolio/*                balancer://httpCluster nocanon
ProxyPassMatch       ^/admin/*                    balancer://httpCluster nocanon
ProxyPassMatch       ^/colorpalettes/*            balancer://httpCluster nocanon
ProxyPassMatch       ^/javascript/*               balancer://httpCluster nocanon
ProxyPassMatch       ^/evidence_area/*            balancer://httpCluster nocanon
ProxyPassMatch       ^/lib/*                      balancer://httpCluster nocanon
ProxyPassMatch       ^/login/*                    balancer://httpCluster nocanon
ProxyPassMatch       ^/themes/*                   balancer://httpCluster nocanon
ProxyPassMatch       ^/ui/*                       balancer://httpCluster nocanon

 

 

Leave a Reply