Hi,

  I have been thinking of the bandwidth throttling, and I want to
  share my notes with you..

  Restriction points
  ==================

  - Server: We have to be able to set a bandwidth limit for the whole
    server.

  - Virtual Server: It is basically the same. Just think of a hosting
    scenario. You would want to limit the bandwidth used by a single
    client.

  - Resources: This is the most interesting one.  We want to be able
    to set an arbitrary limit to individual resources. I have had
    problems before which could be solved easily with this feature.
    This restriction point would be used like: "I want to spend 30Kb/s
    of my bandwidth to let people download MP3 files, no
    more. Otherwise my whole site is going to be down".

    At this moment, our resource management is directory and extension
    based, so we should support configuration in those points. (Don't
    worry about the implementation, directories and extensions are
    *really similar* internally)

    In the future, Cherokee will support some more fine grain resource
    management. It should not be a problem to make it work in that
    scenario though.


  Configuration entries
  =====================

  In my opinion, we need just a configuration reserved word for this.
  Something like "Limit" or "Throttle" might works..

  Let's see an example:

======
  # Set the global server limit
  #
  Limit 100K

  ..

  # Define a virtual server with its own limit
  #
  Server www.example.com {
     Limit 50K

     ..

     # And a limited directory
     #
     Directory /mp3 {
         Limit 30K
         Handler file
     }
  }

======

  NOTE:
  - There might be incoherent configurations: It does not make sense
    to set up a directory with a higher limit than the global server.
    We should worry much about it though.


  Precedence
  ==========

  We have to find a way to pick up the right limit to a connection.

  In my opinion, a precedence is not really needed. We just need to
  use the lowest of the limitation values which can affect a
  connection.

  For example, check these limits with the previous configuration
  example:

  http://www.example.com/mp3/file    30Kb/s limit
  http://www.example.com/file        50Kb/s limit
  http://www.0x50.org/file          100Kb/s limit


  And, by the moment, this is all... ideas? thoughts?


--
Greetings, alo.
_______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to