Bug 23501

Summary: [mod_rewrite] incorrect load balancing solution
Product: Apache httpd-2 Reporter: Dave Boynton <daveboynton>
Component: DocumentationAssignee: HTTP Server Documentation List <docs>
Severity: normal CC: apache.org
Priority: P3 Keywords: PatchAvailable, RFC
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: All   
OS: All   
URL: http://httpd.apache.org/docs/trunk/misc/rewriteguide.html
Attachments: for trunk

Description Dave Boynton 2003-09-29 19:31:36 UTC
The rewrite guide incorrect gives an example using BIND syntax that's been
deprecated for awhile now. Both 2.0 and 1.3 documentation has the same problem.

The example is for:

Load Balancing
    Suppose we want to load balance the traffic to www.foo.com over
www[0-5].foo.com (a total of 6 servers). How can this be done?

The solution goes on to list multiple cnames for the same label:
www    IN  CNAME   www0.foo.com.
       IN  CNAME   www1.foo.com.
       IN  CNAME   www2.foo.com.
       IN  CNAME   www3.foo.com.
       IN  CNAME   www4.foo.com.
       IN  CNAME   www5.foo.com.
       IN  CNAME   www6.foo.com.

This is incorrect, according to RFC 2181 (and other DNS RFCs):
"There may be only one such canonical name for any one alias."
BIND 8 (and prior versions) could be made to work with multiple cnames, but BIND
9 no longer supports it at all.

The correct implementation uses multiple A records for the label, like so:
www   IN  A
      IN  A
      IN  A
      IN  A
      IN  A
      IN  A
Comment 1 Jeff Trawick 2003-11-21 17:35:59 UTC
I'm going through the bug db to make sure patches are findable.  Please see 
Comment 2 Takashi Sato 2007-07-04 23:44:29 UTC
*** Bug 42349 has been marked as a duplicate of this bug. ***
Comment 3 Takashi Sato 2007-07-04 23:47:02 UTC
Created attachment 20448 [details]
for trunk
Comment 4 Joshua Slive 2007-08-01 10:53:22 UTC
Thanks. Fixed on trunk and 2.2.