Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-303

Download Bandwidth Throttling Handler

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.1.0.CR1, 1.2.0.Beta1
    • 1.1.Beta7
    • Core
    • None

      Undertow provides handlers for various topics like LoadBalancerProxyHandler or a RequestLimitHandler, just as examples. Currently there is no download bandwidth throttling handler available. I believe that this is a important handler and would make Undertow
      even more attractive.

      THe handler should allow to define a download bandwidth at constructor level as well as providing a callback interface in which per connection a rate can be defined. Meaning, the user can implement an interface and is able to register this instance into the handler. The request information should be available for making per connection decision.

      I already implemented a solution as servlet by implementing the token bucket algorithm. This algorithm works really good. Google provides a class called RateLimiter. A very good implementation of the algorithm. THis implementation also provides a warmup phase, so that the download rate not suddenly increases. Perhaps this could be a hint for the implementation.

      Regards,
      Ralf

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              rbattenfeld Ralf Battenfeld (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: