]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_proxy_balancer.xml.ja
Document change in lbmethod= argument
[apache] / docs / manual / mod / mod_proxy_balancer.xml.ja
1 <?xml version="1.0" encoding="iso-2022-jp"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
4 <!-- English Revision: 153116 -->
5
6 <!--
7  Copyright 2004-2005 The Apache Software Foundation or its licensors, as
8  applicable.
9
10  Licensed under the Apache License, Version 2.0 (the "License");
11  you may not use this file except in compliance with the License.
12  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_proxy_balancer.xml.meta">
24
25 <name>mod_proxy_balancer</name>
26 <description>\e$BIi2YJ,;6$N$?$a$N\e(B <module>mod_proxy</module> \e$B3HD%\e(B</description>
27 <status>Extension</status>
28 <sourcefile>proxy_balancer.c</sourcefile>
29 <identifier>proxy_balancer_module</identifier>
30 <compatibility>2.1 \e$B0J9_\e(B</compatibility>
31
32 <summary>
33     <p>\e$BK\%b%8%e!<%k$K$O\e(B <module>mod_proxy</module> \e$B$,\e(B<em>\e$BI,MW$G$9\e(B</em>\e$B!#\e(B
34     <code>HTTP</code>, <code>FTP</code> \e$B$H\e(B <code>AJP13</code>
35     \e$B%W%m%H%3%k$N%m!<%I%P%i%s%95!G=$r;}$C$F$$$^$9!#\e(B</p>
36
37     <p>\e$B$G$9$+$i!"\e(B \e$B%m!<%I%P%i%s%9$rM-8z$K$9$k>l9g\e(B <module>mod_proxy</module>
38     \e$B$H\e(B <module>mod_proxy_balancer</module> \e$B$,%5!<%P$KAH$_9~$^$l$F\e(B
39     \e$B$$$J$1$l$P$$$1$^$;$s!#\e(B</p>
40
41     <note type="warning"><title>\e$B7Y9p\e(B</title>
42       <p><a href="mod_proxy.html#access"
43       >\e$B0BA4$J%5!<%P$K$9$k\e(B</a>\e$B$^$G%W%m%/%75!G=$OM-8z$K$7$J$$$G$/$@$5$$!#\e(B
44       \e$B%*!<%W%s%W%m%-%7%5!<%P$O$"$J$?<+?H$N%M%C%H%o!<%/$K$H$C$F$b!"\e(B
45       \e$B%$%s%?!<%M%C%HA4BN$K$H$C$F$b4m81$G$9!#\e(B</p>
46     </note>
47 </summary>
48 <seealso><module>mod_proxy</module></seealso>
49
50 <section id="scheduler">
51     <title>\e$B%m!<%I%P%i%s%5$N%9%1%8%e!<%i$N%"%k%4%j%:%`\e(B</title>
52     <p>\e$B8=;~E@$G$O\e(B 2 \e$B<oN`$N%m!<%I%P%i%s%5%9%1%8%e!<%i%"%k%4%j%:%`$+$iA*$Y$^$9!#\e(B
53     \e$B%j%/%(%9%H2s?t$K$h$k$b$N\e(B <transnote>Request Counting</transnote>
54     \e$B$H!"%H%i%U%#%C%/NL$K$h$k$b$N\e(B <transnote>Weighted Traffic Counting</transnote>
55     \e$B$,$"$j$^$9!#%P%i%s%5$N@_Dj\e(B <code>lbmethod</code> \e$BCM$G!"$I$A$i$r;H$&$+;XDj$7$^$9!#\e(B
56     \e$B>\:Y$O\e(B <directive module="mod_proxy">Proxy</directive> \e$B%G%#%l%/%F%#%V$r\e(B
57     \e$B;2>H$7$F$/$@$5$$!#\e(B</p>
58
59 </section>
60
61 <section id="requests">
62     <title>Request Counting \e$B%"%k%4%j%:%`\e(B</title>
63     <p><code>lbmethod=byrequests</code> \e$B$GM-8z$K$J$j$^$9!#\e(B
64     \e$B$3$N%9%1%8%e!<%i$NGX7J$K$"$k9M$(J}$O!"MM!9$J%o!<%+!<$,$=$l$>$l!"\e(B
65     \e$B@_Dj$5$l$F$$$kJ,C4%j%/%(%9%H?t$r$-$A$s$H<u$1<h$l$k$h$&$K!"\e(B
66     \e$B%j%/%(%9%H$r07$&$H$$$&9M$(J}$G$9!#<!$N$h$&$KF0:n$7$^$9\e(B:</p>
67
68     <p><dfn>lbfactor</dfn> \e$B$O!"\e(B<em>\e$B$I$NDxEY%o!<%+!<$K;E;v$r?6$k$+\e(B</em>
69     \e$B$D$^$j\e(B<em>\e$B%o!<%+!<$N%/%*!<%?\e(B</em>\e$B$r;X$7$^$9!#$3$NCM$O\e(B "\e$BJ,C4\e(B" 
70     \e$BNL$rI=$9@55,2=$5$l$?CM$G$9!#\e(B</p>
71
72     <p><dfn>lbstatus</dfn> \e$B$O!"\e(B<em>\e$B%o!<%+!<$N%/%*!<%?$rK~$?$9$?$a$K\e(B
73     \e$B$I$N$0$i$$5^$.$GF/$+$J$1$l$P$J$i$J$$$+\e(B</em>\e$B$r;X$7$^$9!#\e(B</p>
74
75     <p><dfn>\e$B%o!<%+!<\e(B</dfn>\e$B$O%m!<%I%P%i%s%5$N%a%s%P$G!"DL>o$O!"\e(B
76     \e$B%5%]!<%H$5$l$k%W%m%H%3%k$N$&$A$N0l$D$rDs6!$7$F$$$k%j%b!<%H%[%9%H$G$9!#\e(B
77     </p>
78
79     <p>\e$B$^$:8D!9$N%o!<%+!<$K%o!<%+!<%/%*!<%?$r3d$j?6$j!"$I$N%o!<%+!<$,:G$b5^$.$G\e(B
80     \e$BF/$+$J$1$l$P$J$i$J$$$+\e(B (lbstatus \e$B$,:GBg$N$b$N\e(B) \e$B$rD4$Y$^$9!#\e(B
81     \e$B<!$K;E;v$r$9$k$h$&$K$3$N%o!<%+!<$rA*Br$7!"A*Br$7$?%o!<%+!<$N\e(B lbstatus 
82     \e$B$rA4BN$K3d$j?6$C$?$V$s$@$1:9$70z$-$^$9!#$G$9$+$i!"\e(Blbstatus \e$B$NAmNL$O\e(B
83     \e$B7k2LE*$KJQ2=$7$^$;$s\e(B(*)\e$B$7!"%j%/%(%9%H$O4|BTDL$j$KJ,;6$5$l$^$9!#\e(B</p>
84
85     <p>\e$B$"$k%o!<%+!<$,L58z$K$J$C$F$b!"B>$N$b$N$O@5>o$K%9%1%8%e!<%k$5$lB3$1$^$9!#\e(B
86     </p>
87
88     <example><pre><code>for each worker in workers
89     worker lbstatus += worker lbfactor
90     total factor    += worker lbfactor
91     if worker lbstatus > candidate lbstatus
92         candidate = worker
93
94 candidate lbstatus -= total factor</code></pre>
95     </example>
96
97     <p>\e$B%P%i%s%5$r<!$N$h$&$K@_Dj$7$?>l9g\e(B:</p>
98     
99     <table style="data">
100     <tr><th>worker</th>
101         <th>a</th>
102         <th>b</th>
103         <th>c</th>
104         <th>d</th></tr>
105     <tr><th>lbfactor</th>
106         <td>25</td>
107         <td>25</td>
108         <td>25</td>
109         <td>25</td></tr>
110     <tr><th>lbstatus</th>
111         <td>0</td>
112         <td>0</td>
113         <td>0</td>
114         <td>0</td></tr>
115     </table>
116
117     <p>\e$B$=$7$F\e(B <var>b</var> \e$B$,L58z$K$J$C$?>l9g!"<!$N$h$&$J%9%1%8%e!<%k$,\e(B
118     \e$B9T$o$l$^$9!#\e(B</p>
119
120     <table style="data">
121     <tr><th>worker</th>
122         <th>a</th>
123         <th>b</th>
124         <th>c</th>
125         <th>d</th></tr>
126     <tr><th>lbstatus</th>
127         <td><em>-50</em></td>
128         <td>0</td>
129         <td>25</td>
130         <td>25</td></tr>
131     <tr><th>lbstatus</th>
132         <td>-25</td>
133         <td>0</td>
134         <td><em>-25</em></td>
135         <td>50</td></tr>
136     <tr><th>lbstatus</th>
137         <td>0</td>
138         <td>0</td>
139         <td>0</td>
140         <td><em>0</em></td></tr>
141     <tr><td colspan="5">(repeat)</td></tr>
142     </table>
143
144     <p>\e$B$D$^$j$3$N$h$&$K%9%1%8%e!<%k$5$l$^$9\e(B: <var>a</var> <var>c</var>
145     <var>d</var> <var>a</var> <var>c</var> <var>d</var> <var>a</var>
146     <var>c</var> <var>d</var> ... \e$B<!$NE@$KCm0U$7$F$/$@$5$$\e(B:</p>
147
148     <table style="data">
149     <tr><th>worker</th>
150         <th>a</th>
151         <th>b</th>
152         <th>c</th>
153         <th>d</th></tr>
154     <tr><th>lbfactor</th>
155         <td>25</td>
156         <td>25</td>
157         <td>25</td>
158         <td>25</td></tr>
159     </table>
160
161     <p>\e$B$3$N5sF0$O!"<!$N@_Dj$HA4$/F1$8$K$J$j$^$9\e(B:</p>
162
163     <table style="data">
164     <tr><th>worker</th>
165         <th>a</th>
166         <th>b</th>
167         <th>c</th>
168         <th>d</th></tr>
169     <tr><th>lbfactor</th>
170         <td>1</td>
171         <td>1</td>
172         <td>1</td>
173         <td>1</td></tr>
174     </table>
175
176     <p>This is because all values of <dfn>lbfactor</dfn> are normalized
177     with respect to the others. For:</p>
178     <p><dfn>lbfactor</dfn> \e$B$OA4$F@55,2=$5$l$?$b$N$G!"\e(B
179     \e$BB>$H$NAjBPCM$@$+$i$G$9!#<!$N@_Dj$G$O\e(B:</p>
180
181     <table style="data">
182     <tr><th>worker</th>
183         <th>a</th>
184         <th>b</th>
185         <th>c</th></tr>
186     <tr><th>lbfactor</th>
187         <td>1</td>
188         <td>4</td>
189         <td>1</td></tr>
190     </table>
191
192     <p>\e$B%o!<%+!<\e(B <var>b</var> \e$B$O!"J?6Q$7$F!"\e(B<var>a</var> \e$B$H\e(B <var>c</var>
193     \e$B$N\e(B 4 \e$BG\$N?t$N%j%/%(%9%H$r<u$1;}$D$3$H$K$J$j$^$9!#\e(B</p>
194
195     <p>\e$B<!$N$h$&$JHsBP>N$J@_Dj$G$O!"$3$&$J$k$HM=A[$5$l$k$G$7$g$&\e(B:</p>
196
197     <table style="data">
198     <tr><th>worker</th>
199         <th>a</th>
200         <th>b</th></tr>
201     <tr><th>lbfactor</th>
202         <td>70</td>
203         <td>30</td></tr>
204     <tr><td colspan="2">&nbsp;</td></tr>
205     <tr><th>lbstatus</th>
206         <td><em>-30</em></td>
207         <td>30</td></tr>
208     <tr><th>lbstatus</th>
209         <td>40</td>
210         <td><em>-40</em></td></tr>
211     <tr><th>lbstatus</th>
212         <td><em>10</em></td>
213         <td>-10</td></tr>
214     <tr><th>lbstatus</th>
215         <td><em>-20</em></td>
216         <td>20</td></tr>
217     <tr><th>lbstatus</th>
218         <td><em>-50</em></td>
219         <td>50</td></tr>
220     <tr><th>lbstatus</th>
221         <td>20</td>
222         <td><em>-20</em></td></tr>
223     <tr><th>lbstatus</th>
224         <td><em>-10</em></td>
225         <td>10</td></tr>
226     <tr><th>lbstatus</th>
227         <td><em>-40</em></td>
228         <td>40</td></tr>
229     <tr><th>lbstatus</th>
230         <td>30</td>
231         <td><em>-30</em></td></tr>
232     <tr><th>lbstatus</th>
233         <td><em>0</em></td>
234         <td>0</td></tr>
235     <tr><td colspan="3">(repeat)</td></tr>
236     </table>
237
238     <p>\e$B%9%1%8%e!<%k$O\e(B 10 \e$B%9%1%8%e!<%k8e$K7+$jJV$5$l!"\e(B<var>a</var> 7 \e$B2s$H\e(B
239     <var>b</var> 3 \e$B2s$G$^$P$i$KA*$P$l$^$9!#\e(B</p>
240 </section>
241
242 <section id="traffic">
243     <title>Weighted Traffic Counting \e$B%"%k%4%j%:%`\e(B</title>
244     <p><code>lbmethod=bytraffic</code> \e$B$GM-8z$K$J$j$^$9!#\e(B
245     \e$B$3$N%9%1%8%e!<%i$NGX7J$K$"$k9M$(J}$O!"\e(BRequest Counting 
246     \e$B$HHs>o$K;w$F$$$^$9$,!"<!$N0c$$$,$"$j$^$9\e(B:</p>
247
248     <p><dfn>lbfactor</dfn> \e$B$O\e(B <em>\e$B$I$l$@$1$N%P%$%H?t$N%H%i%U%#%C%/NL$r!"\e(B
249     \e$B$3$N%o!<%+!<$K=hM}$7$F$b$i$$$?$$$+\e(B</em> \e$B$rI=$7$^$9!#\e(B
250     \e$B$3$NCM$bF1MM$K@55,2=$5$l$?CM$G!"%o!<%+!<A4BN$N$&$A$G$N\e(B "\e$BJ,C4\e(B"
251     \e$BNL$rI=8=$7$F$$$^$9!#%j%/%(%9%H?t$rC1=c$K?t$($kBe$o$j$K!"\e(B
252     \e$B$I$l$@$1$NE>AwNL$r=hM}$7$?$+$r?t$($^$9!#\e(B</p>
253
254     <p>\e$B<!$N$h$&$K%P%i%s%5$r@_Dj$7$?>l9g\e(B:</p>
255     
256     <table style="data">
257     <tr><th>worker</th>
258         <th>a</th>
259         <th>b</th>
260         <th>c</th></tr>
261     <tr><th>lbfactor</th>
262         <td>1</td>
263         <td>2</td>
264         <td>1</td></tr>
265     </table>
266
267     <p><var>b</var> \e$B$K$O\e(B <var>a</var> \e$B$d\e(B <var>c</var> \e$B$N\e(B 2 \e$BG\\e(B
268     \e$B=hM}$7$F$[$7$$$H$$$&$3$H$K$J$j$^$9!#\e(B
269     <var>b</var> \e$B$O\e(B 2 \e$BG\$N\e(B I/O \e$B$r=hM}$9$k$H$$$&0UL#$K$J$j!"\e(B
270     2 \e$BG\$N%j%/%(%9%H?t$r=hM}$9$k$H$$$&$3$H$K$O$J$j$^$;$s!#\e(B
271     \e$B$G$9$+$i%j%/%(%9%H$H%l%9%]%s%9$N%5%$%:$,!"\e(B
272     \e$B=E$_IU$1$H?6$jJ,$1$N%"%k%4%j%:%`$K8z$$$F$$$^$9!#\e(B</p>
273
274 </section>
275
276 <section id="enable">
277     <title>\e$B%P%i%s%5%^%M!<%8%c$N%5%]!<%H$rM-8z$K$9$k\e(B</title>
278     <p>\e$B$3$N%b%8%e!<%k$O\e(B <module>mod_status</module> \e$B$N%5!<%S%9$r\e(B
279     <em>\e$BI,MW$H$7$^$9\e(B</em>\e$B!#\e(B
280     \e$B%P%i%s%5%^%M!<%8%c$r;H$&$H!"%P%i%s%5$N%a%s%P!<$NF0E*$J99?7$,\e(B
281     \e$B$G$-$^$9!#%P%i%s%5%^%M!<%8%c$r;H$C$F!"%P%i%s%978?t\e(B (lbfactor)
282     \e$B$rJQ99$7$?$j!"%a%s%P!<$rJQ99$7$?$j!"FCDj$N%a%s%P!<$r\e(B
283     \e$B%*%U%i%$%s%b!<%I$K$7$?$j$G$-$^$9!#\e(B</p>
284
285     <p>\e$B$G$9$+$i!"%m!<%I%P%i%s%54IM}5!G=$r;H$$$?$1$l$P!"\e(B
286     <module>mod_status</module> \e$B$H\e(B <module>mod_proxy_balancer</module>
287     \e$B$r%5!<%P$KAH$_9~$^$J$1$l$P$J$j$^$;$s!#\e(B</p>
288
289     <p>foo.com \e$B%I%a%$%s$N%V%i%&%6$+$i%m!<%I%P%i%s%54IM}5!G=$r\e(B
290     \e$B;H$($k$h$&$K$9$k$K$O!"<!$N$h$&$J%3!<%I$r\e(B <code>httpd.conf</code>
291     \e$B$KDI2C$7$^$9!#\e(B</p>
292 <example>
293     &lt;Location /balancer-manager&gt;<br />
294     SetHandler balancer-manager<br />
295 <br />
296     Order Deny,Allow<br />
297     Deny from all<br />
298     Allow from .foo.com<br />
299     &lt;/Location&gt;
300 </example>
301
302     <p>\e$B$3$&$9$k$H!"\e(B<code>http://your.server.name/balancer-manager</code>
303     \e$B$N%Z!<%87PM3$G!"%&%'%V%V%i%&%6$+$i%m!<%I%P%i%s%5%^%M!<%8%c$K\e(B
304     \e$B%"%/%;%9$G$-$k$h$&$K$J$j$^$9!#\e(B</p>
305 </section>
306
307 </modulesynopsis>