This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 9a6f2f5dca58bd7ca950b839a6db2104a739318e
Author: Benoit TELLIER <btell...@linagora.com>
AuthorDate: Thu Nov 21 12:03:25 2024 +0100

    JAMES-4093 Document IMAP traffic shaping
---
 docs/modules/servers/partials/configure/imap.adoc | 26 +++++++++++++++++++++
 src/site/xdoc/server/config-imap4.xml             | 28 +++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/docs/modules/servers/partials/configure/imap.adoc 
b/docs/modules/servers/partials/configure/imap.adoc
index ded1332c5d..1965f17700 100644
--- a/docs/modules/servers/partials/configure/imap.adoc
+++ b/docs/modules/servers/partials/configure/imap.adoc
@@ -154,6 +154,32 @@ Please configure `auth.oidc` part to use this.
 We do supply an 
link:https://github.com/apache/james-project/tree/master/examples/oidc[example] 
of such a setup.
 It uses the Keycloak OIDC provider, but usage of similar technologies is 
definitely doable.
 
+== Traffic Shaping
+
+James ships optional 
link:https://netty.io/4.0/api/io/netty/handler/traffic/ChannelTrafficShapingHandler.html[Netty
 built in Traffic Shaping] that can be optionally configured.
+
+This enables both:
+ - Record per channel bandwidth consumption
+ - Allows defining per channel bandwidth limit, which helps at fairness and 
maintaining a good quality of service.
+
+Example:
+
+....
+    <imapserver>
+        <!-- ... -->
+        <trafficShaping>
+            <writeTrafficPerSecond>0</writeTrafficPerSecond>
+            <readTrafficPerSecond>0</readTrafficPerSecond>
+            <checkInterval>1</checkInterval>
+            <maxDelays>30</maxDelays>
+        </trafficShaping>
+    </imapserver>
+....
+
+Those tags maps to the corresponding Netty argument.
+
+If omitted no traffic handle is added to the channel pipeline.
+
 == Extending IMAP
 
 IMAP decoders, processors and encoder can be customized. 
xref:customization:imap.adoc[Read more].
diff --git a/src/site/xdoc/server/config-imap4.xml 
b/src/site/xdoc/server/config-imap4.xml
index c15f709d8e..b925d8fb5c 100644
--- a/src/site/xdoc/server/config-imap4.xml
+++ b/src/site/xdoc/server/config-imap4.xml
@@ -145,6 +145,34 @@
         <p>We do supply an <a 
href="https://github.com/apache/james-project/tree/master/examples/oidc";>example</a>
 of such a setup. It uses the
             <a href="https://www.keycloak.org/";>Keycloack</a> OIDC provider, 
but usage of similar technologies is definitely doable.</p>
     </subsection>
+    <subsection name="Traffic Shaping">
+
+        <p>James ships optional <a 
href="https://netty.io/4.0/api/io/netty/handler/traffic/ChannelTrafficShapingHandler.html";>Netty
 built in Traffic Shaping</a>
+            that can be optionally configured.</p>
+
+        <ul>This enables both:
+            <li>Record per channel bandwidth consumption</li>
+            <li>Allows defining per channel bandwidth limit, which helps at 
fairness and maintaining a good quality of service.</li>
+        </ul>
+
+        <p>Example:</p>
+
+        <pre><code>
+&lt;imapserver&gt;
+    &lt;!-- ... --&gt;
+        &lt;trafficShaping&gt;
+            &lt;writeTrafficPerSecond&gt;0&lt;/writeTrafficPerSecond&gt;
+            &lt;readTrafficPerSecond&gt;0&lt;/readTrafficPerSecond&gt;
+            &lt;checkInterval&gt;1&lt;/checkInterval&gt;
+            &lt;maxDelays&gt;30&lt;/maxDelays&gt;
+        &lt;/trafficShaping&gt;
+&lt;/imapserver&gt;
+        </code></pre>
+
+        <p>Those tags maps to the corresponding Netty argument.</p>
+
+        <p>If omitted no traffic handle is added to the channel pipeline.</p>
+    </subsection>
 
     <subsection name="Extending IMAP">
         <p><b>WARNING: </b>IMAP extension applies only for Guice based 
distributions</p>


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to