chibenwa commented on a change in pull request #876:
URL: https://github.com/apache/james-project/pull/876#discussion_r800449470



##########
File path: server/mailet/rate-limiter/README.adoc
##########
@@ -84,6 +86,7 @@ this mailet twice within your `mailetcontainer.xml` file. 
Defaults to none.
 - *exceededProcessor*: Processor to which emails whose rate is exceeded should 
be redirected to. Defaults to error.
 Use this to customize the behaviour upon exceeded rate.
 - *duration*: Duration during which the rate limiting shall be applied. 
Compulsory, must be a valid duration of at least one second. Supported units 
includes s (second), m (minute), h (hour), d (day).
+- *precision*: Defines the time precision that will be used to approximate the 
sliding window. A lower duration increases precision. The precision must be 
greater than 1 second. Optional, default to duration means fixed window 
counters. Supported units includes s (second), m (minute), h (hour), d (day).

Review comment:
       How about documenting precision for PerRcptRateLimiter?

##########
File path: 
server/mailet/rate-limiter/src/main/scala/org/apache/james/transport/mailets/GlobalRateLimit.scala
##########
@@ -66,6 +66,7 @@ case class GlobalRateLimiter(rateLimiter: 
Option[RateLimiter], keyPrefix: Option
  *    <li><b>exceededProcessor</b>: Processor to which emails whose rate is 
exceeded should be redirected to. Defaults to error.
  *    Use this to customize the behaviour upon exceeded rate.</li>
  *    <li><b>duration</b>: Duration during which the rate limiting shall be 
applied. Compulsory, must be a valid duration of at least one second. Supported 
units includes s (second), m (minute), h (hour), d (day).</li>
+ *    <li><b>precision</b>: Defines the time precision that will be used to 
approximate the sliding window. A lower duration increases precision. The 
precision must be greater than 1 second. Optional, default to duration means 
fixed window counters. Supported units includes s (second), m (minute), h 
(hour), d (day).</li>

Review comment:
       A lower duration increases precision but requests more computing power.

##########
File path: 
server/mailet/rate-limiter/src/main/scala/org/apache/james/transport/mailets/PerSenderRateLimit.scala
##########
@@ -66,6 +66,7 @@ case class SenderKey(keyPrefix: Option[KeyPrefix], 
entityType: EntityType, mailA
  *    <li><b>exceededProcessor</b>: Processor to which emails whose rate is 
exceeded should be redirected to. Defaults to error.
  *    Use this to customize the behaviour upon exceeded rate.</li>
  *    <li><b>duration</b>: Duration during which the rate limiting shall be 
applied. Compulsory, must be a valid duration of at least one second. Supported 
units includes s (second), m (minute), h (hour), d (day).</li>
+ *    <li><b>precision</b>: Defines the time precision that will be used to 
approximate the sliding window. A lower duration increases precision. The 
precision must be greater than 1 second. Optional, default to duration means 
fixed window counters. Supported units includes s (second), m (minute), h 
(hour), d (day).</li>

Review comment:
       A lower duration increases precision but requests more computing power.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to