Issue #539 resolved

Dynamic spare thread creation and destruction

Anonymous created an issue

In regards of ticket #497, I was wondering if we should not start considering a way to create new threads when the HTTP server becomes overloaded.

Simply something such as:

  • as soon as you reach the limit defined by the deployer server.thread_pool, create half the size of that pool in new threads.
  • as soon as the number of used threads is below half of the size of the pool, stop half the size of that pool number of threads

That would allow the server to react a bit more dynamically.


Reported by lawouach

Comments (5)

  1. jamwt

    Attaching a general thread pool, max/spare setup (ala apache) with growth on demand and gradual decay.

    Doesn't do ''exactly'' what Lawouach described, but I hadn't read this ticket yet. :-)

  2. jamwt

    Also, it's worth noting, that bit of code was not designed to be thread-safe in the case of multiple threads performing management (i.e., adding jobs, calling tick()) operations on it. It's written with a single-thread "master/dispatcher" model in mind.

  3. Log in to comment