Bug 23501 - [mod_rewrite] incorrect load balancing solution
Summary: [mod_rewrite] incorrect load balancing solution
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: HTTP Server Documentation List
URL: http://httpd.apache.org/docs/trunk/mi...
Keywords: PatchAvailable, RFC
: 42349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-29 19:31 UTC by Dave Boynton
Modified: 2007-08-01 10:53 UTC (History)
1 user (show)



Attachments
for trunk (1.21 KB, patch)
2007-07-04 23:47 UTC, Takashi Sato
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
Description:
    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       1.2.3.1
      IN  A       1.2.3.2
      IN  A       1.2.3.3
      IN  A       1.2.3.4
      IN  A       1.2.3.5
      IN  A       1.2.3.6
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 
http://httpd.apache.org/dev/patches.html
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.