[jira] [Closed] (JAMES-4140) Ability to shape IMAP applicative traffic
"Benoit Tellier (Jira)" <[email protected]>
| Newsgroups | gmane.comp.jakarta.james.devel |
|---|---|
| Message-ID | <[email protected]> |
[ https://issues.apache.org/jira/browse/JAMES-4140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Tellier closed JAMES-4140.
---------------------------------
Resolution: Fixed
Merged
> Ability to shape IMAP applicative traffic
> -----------------------------------------
>
> Key: JAMES-4140
> URL: https://issues.apache.org/jira/browse/JAMES-4140
> Project: James Server
> Issue Type: Improvement
> Components: IMAPServer
> Reporter: Benoit Tellier
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> h2. Why?
> Some clients (Outlook) resynchronizes with an infinite loop on folders, SELECTing them all one by one.
> This naive implementation results in an absurdly high workload.
> Optimizing the given commands would not be a solution as it would only result in a higher workload as requests would be even more frequent.
> Additionnally, being able to regulate traffic, imposing delays to clients that exceeds their QoS, seems like a desirable feature of a production-ready email server.
> h2. How?
> Implement a Netty ChannelInboundHandlerAdapter to be placed between IMAP command parsing and execution adding delays prior command execution as needed.
> h3. Configuration proposal
> The user can declare the list of commands on which throttling needs to be tracked and for each:
> - `thresholdCount`: below this number of occurrence, no throttling is applied. Integer.
> - `additionalDelayPerOperation`: delay to be applied when exceeding the threshold. The delay is cumulative and thus
> would always increase. Duration.
> - `observationPeriod`: the count of observed commands is reset after this period thus stopping delays. Duration.
> - `maxDelay`: maximum value the client will be delayed for.
> Sample configuration:
> {code:xml}
> <imapserver>
> <!-- ... -->
> <perSessionCommandThrottling>
> <select>
> <thresholdCount>25</thresholdCount>
> <additionalDelayPerOperation>2ms</additionalDelayPerOperation>
> <observationPeriod>10m</observationPeriod>
> <maxDelay>1s</maxDelay>
> </select>
> <append>
> <thresholdCount>5</thresholdCount>
> <additionalDelayPerOperation>10ms</additionalDelayPerOperation>
> <observationPeriod>5m</observationPeriod>
> <maxDelay>2s</maxDelay>
> </append>
> </perSessionCommandThrottling>
> </imapserver>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)