]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_lbmethod_byrequests.html.fr
Merge in APR[-util] macros from branches/trunk-buildconf-noapr
[apache] / docs / manual / mod / mod_lbmethod_byrequests.html.fr
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
5 <!--
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7               This file is generated from xml source: DO NOT EDIT
8         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9       -->
10 <title>mod_lbmethod_byrequests - Serveur Apache HTTP Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
15 </script>
16
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
18 <body>
19 <div id="page-header">
20 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
21 <p class="apache">Serveur Apache HTTP Version 2.5</p>
22 <img alt="" src="../images/feather.png" /></div>
23 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
24 <div id="path">
25 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
26 <div id="page-content">
27 <div id="preamble"><h1>Module Apache mod_lbmethod_byrequests</h1>
28 <div class="toplang">
29 <p><span>Langues Disponibles: </span><a href="../en/mod/mod_lbmethod_byrequests.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
30 <a href="../fr/mod/mod_lbmethod_byrequests.html" title="Français">&nbsp;fr&nbsp;</a></p>
31 </div>
32 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Algorithme de planification avec répartition de charge du
33 traitement des requêtes pour le module
34 <code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code></td></tr>
35 <tr><th><a href="module-dict.html#Status">Statut:</a></th><td>Extension</td></tr>
36 <tr><th><a href="module-dict.html#ModuleIdentifier">Identificateur de Module:</a></th><td>lbmethod_byrequests_module</td></tr>
37 <tr><th><a href="module-dict.html#SourceFile">Fichier Source:</a></th><td>mod_lbmethod_byrequests.c</td></tr>
38 <tr><th><a href="module-dict.html#Compatibility">Compatibilité:</a></th><td>Dissocié de <code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code> dans la
39 version 2.3</td></tr></table>
40 <h3>Sommaire</h3>
41
42 <p>Ce module ne fournit pas lui-même de directive de configuration. Il
43 nécessite les services de <code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code>, et
44 fournit la méthode de répartition de charge <code>byrequests</code>.</p>
45 </div>
46 <div id="quickview"><h3>Sujets</h3>
47 <ul id="topics">
48 <li><img alt="" src="../images/down.gif" /> <a href="#requests">Algorithme d'attribution des requêtes</a></li>
49 </ul><h3 class="directives">Directives</h3>
50 <p>Ce module ne fournit aucune directive.</p>
51 <h3>Traitement des bugs</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">Journal des modifications de httpd</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&amp;list_id=144532&amp;product=Apache%20httpd-2&amp;query_format=specific&amp;order=changeddate%20DESC%2Cpriority%2Cbug_severity&amp;component=mod_lbmethod_byrequests">Problèmes connus</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&amp;component=mod_lbmethod_byrequests">Signaler un bug</a></li></ul><h3>Voir aussi</h3>
52 <ul class="seealso">
53 <li><code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code></li>
54 <li><code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code></li>
55 <li><a href="#comments_section">Commentaires</a></li></ul></div>
56 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
57 <div class="section">
58 <h2><a name="requests" id="requests">Algorithme d'attribution des requêtes</a></h2>
59     
60     <p>Activé via <code>lbmethod=byrequests</code>, ce planificateur à
61     été conçu dans le but de distribuer les requêtes à tous les
62     processus worker afin qu'ils traitent tous le nombre de requêtes
63     pour lequel ils ont été configurés. Il fonctionne de la manière
64     suivante : </p>
65
66     <p><dfn>lbfactor</dfn> correspond à la <em>quantité de travail que
67     nous attendons de ce processus worker</em>, ou en d'autres termes
68     son <em>quota de travail</em>. C'est une valeur normalisée
69     représentant leur part du travail à accomplir.</p>
70
71     <p><dfn>lbstatus</dfn> représente <em>combien il est urgent que
72     ce processus worker travaille pour remplir son quota de
73     travail</em>.</p>
74
75     <p>Le <dfn>worker</dfn> est un membre du dispositif de répartition
76     de charge, en général un serveur distant traitant un des protocoles
77     supportés.</p>
78
79     <p>On distribue à chaque processus worker son quota de travail, puis
80     on regarde celui qui a le plus besoin de travailler
81     (le plus grand lbstatus). Ce processus est alors sélectionné pour
82     travailler, et son lbstatus diminué de l'ensemble des quotas de
83     travail que nous avons distribués à tous les processus. La somme de
84     tous les lbstatus n'est ainsi pas modifiée, et nous pouvons
85     distribuer les requêtes selon nos souhaits.</p>
86
87     <p>Si certains processus workers sont désactivés, les autres feront
88     l'objet d'une planification normale.</p>
89
90     <div class="example"><pre><code>for each worker in workers
91     worker lbstatus += worker lbfactor
92     total factor    += worker lbfactor
93     if worker lbstatus &gt; candidate lbstatus
94         candidate = worker
95
96 candidate lbstatus -= total factor</code></pre></div>
97
98     <p>Si un répartiteur de charge est configuré comme suit :</p>
99
100     <table><tr><th>worker</th>
101         <th class="data">a</th>
102         <th class="data">b</th>
103         <th class="data">c</th>
104         <th class="data">d</th></tr>
105 <tr><th>lbfactor</th>
106         <td class="data">25</td>
107         <td class="data">25</td>
108         <td class="data">25</td>
109         <td class="data">25</td></tr>
110 <tr><th>lbstatus</th>
111         <td class="data">0</td>
112         <td class="data">0</td>
113         <td class="data">0</td>
114         <td class="data">0</td></tr>
115 </table>
116
117     <p>Et si <var>b</var> est désactivé, la planification suivante est
118     mise en oeuvre :</p>
119
120     <table><tr><th>worker</th>
121         <th class="data">a</th>
122         <th class="data">b</th>
123         <th class="data">c</th>
124         <th class="data">d</th></tr>
125 <tr><th>lbstatus</th>
126         <td class="data"><em>-50</em></td>
127         <td class="data">0</td>
128         <td class="data">25</td>
129         <td class="data">25</td></tr>
130 <tr><th>lbstatus</th>
131         <td class="data">-25</td>
132         <td class="data">0</td>
133         <td class="data"><em>-25</em></td>
134         <td class="data">50</td></tr>
135 <tr><th>lbstatus</th>
136         <td class="data">0</td>
137         <td class="data">0</td>
138         <td class="data">0</td>
139         <td class="data"><em>0</em></td></tr>
140 <tr><td class="data" colspan="5">(repeat)</td></tr>
141 </table>
142
143     <p>C'est à dire la chronologie suivante : <var>a</var> <var>c</var>
144     <var>d</var>
145     <var>a</var> <var>c</var> <var>d</var> <var>a</var> <var>c</var>
146     <var>d</var> ... Veuillez noter que :</p>
147
148     <table><tr><th>worker</th>
149         <th class="data">a</th>
150         <th class="data">b</th>
151         <th class="data">c</th>
152         <th class="data">d</th></tr>
153 <tr><th>lbfactor</th>
154         <td class="data">25</td>
155         <td class="data">25</td>
156         <td class="data">25</td>
157         <td class="data">25</td></tr>
158 </table>
159
160     <p>A le même effet que :</p>
161
162     <table><tr><th>worker</th>
163         <th class="data">a</th>
164         <th class="data">b</th>
165         <th class="data">c</th>
166         <th class="data">d</th></tr>
167 <tr><th>lbfactor</th>
168         <td class="data">1</td>
169         <td class="data">1</td>
170         <td class="data">1</td>
171         <td class="data">1</td></tr>
172 </table>
173
174     <p>Ceci est dû au fait que toutes les valeurs de <dfn>lbfactor</dfn>
175     sont normalisées et évaluées en fonction des autres. Avec :</p>
176
177     <table><tr><th>worker</th>
178         <th class="data">a</th>
179         <th class="data">b</th>
180         <th class="data">c</th></tr>
181 <tr><th>lbfactor</th>
182         <td class="data">1</td>
183         <td class="data">4</td>
184         <td class="data">1</td></tr>
185 </table>
186
187     <p>le processus <var>b</var> va, en moyenne, se voir assigner 4 fois
188     plus de requêtes que <var>a</var> et <var>c</var>.</p>
189
190     <p>La configuration suivante, asymétrique, fonctionne comme on peut
191     s'y attendre :</p>
192
193     <table><tr><th>worker</th>
194         <th class="data">a</th>
195         <th class="data">b</th></tr>
196 <tr><th>lbfactor</th>
197         <td class="data">70</td>
198         <td class="data">30</td></tr>
199 <tr><td class="data" colspan="2">&nbsp;</td></tr>
200 <tr><th>lbstatus</th>
201         <td class="data"><em>-30</em></td>
202         <td class="data">30</td></tr>
203 <tr><th>lbstatus</th>
204         <td class="data">40</td>
205         <td class="data"><em>-40</em></td></tr>
206 <tr><th>lbstatus</th>
207         <td class="data"><em>10</em></td>
208         <td class="data">-10</td></tr>
209 <tr><th>lbstatus</th>
210         <td class="data"><em>-20</em></td>
211         <td class="data">20</td></tr>
212 <tr><th>lbstatus</th>
213         <td class="data"><em>-50</em></td>
214         <td class="data">50</td></tr>
215 <tr><th>lbstatus</th>
216         <td class="data">20</td>
217         <td class="data"><em>-20</em></td></tr>
218 <tr><th>lbstatus</th>
219         <td class="data"><em>-10</em></td>
220         <td class="data">10</td></tr>
221 <tr><th>lbstatus</th>
222         <td class="data"><em>-40</em></td>
223         <td class="data">40</td></tr>
224 <tr><th>lbstatus</th>
225         <td class="data">30</td>
226         <td class="data"><em>-30</em></td></tr>
227 <tr><th>lbstatus</th>
228         <td class="data"><em>0</em></td>
229         <td class="data">0</td></tr>
230 <tr><td class="data" colspan="3">(repeat)</td></tr>
231 </table>
232
233     <p>Après 10 distributions, la planification se répète et 7
234     <var>a</var> sont sélectionnés avec 3 <var>b</var> intercalés.</p>
235 </div>
236 </div>
237 <div class="bottomlang">
238 <p><span>Langues Disponibles: </span><a href="../en/mod/mod_lbmethod_byrequests.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
239 <a href="../fr/mod/mod_lbmethod_byrequests.html" title="Français">&nbsp;fr&nbsp;</a></p>
240 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
241 <script type="text/javascript"><!--//--><![CDATA[//><!--
242 var comments_shortname = 'httpd';
243 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_lbmethod_byrequests.html';
244 (function(w, d) {
245     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
246         d.write('<div id="comments_thread"><\/div>');
247         var s = d.createElement('script');
248         s.type = 'text/javascript';
249         s.async = true;
250         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
251         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
252     }
253     else {
254         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
255     }
256 })(window, document);
257 //--><!]]></script></div><div id="footer">
258 <p class="apache">Copyright 2017 The Apache Software Foundation.<br />Autorisé sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
259 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
260 if (typeof(prettyPrint) !== 'undefined') {
261     prettyPrint();
262 }
263 //--><!]]></script>
264 </body></html>