Apache 2.2 and mod_proxy_balancer

ApacheCon EU 2006: Dublin, June 28, 2006.

Apache 2.2 and mod_proxy_balancer Hello World (Slide Two)

  • Introduction
  • The Basics:
    • A Problem and Possible Solution
    • Review of Proxying
    • Review of Load Balancing
  • The Nit anf Gritty
    • The Solution
    • Setting Up the Reverse Proxy
    • Setting Up the Load Balancer
    • Pulling Everything Together

Notice (Slide Three)

"Persons attempting to find a motive in this narrative will be prosecuted;persons attempting to find a moral will be banished; persons attempting to find a plot will be shot."

- Preface for The Adventures of Huck Finn By Mark Twain

The Basics (Slide Four)

Proxying and Load Balancing

The Problem (Slide Five)

  • Control Access to Internal Set of Web Servers Providing a Critical Web Application while Managing the Proper Utilization of Web Servers in Question

The Problem (Slide Six)

Possible Solution (Slide Seven)

  • Reverse Web Proxy
    • Control Access to Internal Web Servers
      • Sits @ Gateway to Internal Network
        • Cache Content
        • Control Access
        • Filter Content

Possible Solution (Slide Eight)

  • Load Balancer
    • Redundancy with Failover for Critical App
      • Controllable Failover
    • Distribution of Work Load for Better Utilization of Web Servers

Possible Solution (Slide Nine)

  • Apache Specific
    • mod_proxy and mod_rewrite
      • Completely Random
    • mod_proxy and mod_jk
      • Apache Module for Communication Between Apache and Tomcat Instances
      • Provides Load Balancing of
        • AJP13
        • HTTP
    • mod_proxy and mod_proxy_balancer
      • "One" Solution mod_proxy_* for All Requirements
      • Provides Load Balancing of
        • HTTP
        • FTP
        • AJP13

Apache 2.2 (Slide Ten)

  • Released on 2/Dec/05
  • Current Version is 2.2.2
  • Continues Redevelopment and Enhancement of mod_proxy
    • mod_proxy_balancer
    • mod_proxy_ajp

mod_proxy (Slide Eleven)

  • Important Feature of Apache Web Server
  • Forward or Reverse Proxying
  • Modules in Play
    • mod_proxy
    • mod_proxy_http
    • mod_proxy_ftp
    • mod_proxy_connect
    • mod_proxy_html
    • mod_cache

mod_proxy_balancer (Slide Twelve)

  • New to Apache with Version 2.2
  • Provides Load Balancing for
    • HTTP
    • FTP
    • AJP13
  • Load Balancing Methods
    • Request Counting
    • Traffic Counting

The Nit and Gritty (Slide Thirteen)

Creating and Putting to Use Our Proxy/Load Balancing Server

The Solution (Slide Fourteen)

Setting Up Reverse Proxy (Slide Fifteen)

  • ProxyRequests - Enable/Disable Forward Proxying
  • ProxyPass - Pass Requests for /wcs Onward
  • ProxyPassReverse - Remap Header Information

Setting Up Load Balancer (Slide Sixteen)

  • ProxyPass
    • stickysession - Sticky Session Name, if Defined
    • nofailover - If Enabled, Current Session Break if Worker Disabled
    • lbmethod - Load Balancing Method in Use, byrequest or bytraffic
    • timeout - Time to Wait for a Worker
    • maxattempts - Number of Failover Attempts Before Giving Up

Setting Up Load Balancer (Slide Seventeen)

  • BalanceMember
    • loadfactor - Worker Load Factor Between 1 and 100 and Defines the Normalized Weighted Load Applied to the Worker.
    • route - Route of the Worker. The Route is a Value Appended to Session ID Name.
    • redirect - Redirection Route of the Worker.

Setting Up Load Balancer (Slide Eighteen)

Pulling Everything Together (Slide Nineteen)

  • RequestHeader - Replace, Merge or Remove HTTP Request Headers
  • ProxyHTMLURLMap - This Directive, Part of mod_proxy_html, is Used for Rewriting HTML Links
  • ProxyPassReverseCookiePath - Similar to ProxyPassReverse, but Rewrites the Path String in the Set-Cookie Header

Pulling Everything Together (Slide Twenty)

Pulling Everything Together (Slide Twenty One)

  • Single Point of Failure at Proxy/Load Balancer
  • Need Solution for Proxy/Load Balancer
    • Round Robin DNS

Pulling Everything Together (Slides Twenty Two)

Review (Slide Twenty Three)

  • The Basics
    • Review of Proxying
    • Review of Load Balancing
    • A Problem and Possible Solution
  • The Nit and Gritty
    • The Solution
    • Setting Up the Reverse Proxy
    • Setting Up the Load Balancer
    • Pulling Everything Together

Citation (Slide Twenty Four)

Resources (Slide Twenty Five)

Any Questions? (Slide Twenty Six)