Limit the amount of parallel servlet processing

We have a servlet that takes up more virtual memory on the server when uploading files. For this reason, we would like to limit concurrent requests to this server, for example, we would like only 10 requests to be processed in parallel. We would like other requests to wait in the queue.

Is it possible to create a custom thread pool and configure the maximum number of threads and assign this servlet to handle this scenario? We are using WebLogic 9.2 server. Or is there any other better approach to this? Appreciate any thoughts.

Can we set up a separate servlet and configure the thread pool to only allow X number of concurrent requests, all other requests will be queued to use the next available servlet. Does this approach fit the timeout error? Could you tell us more about this? thank

http://download.oracle.com/docs/cd/E13222%5F01/wls/docs92/perform/appb%5Fqueues.html

+2


source to share


1 answer


Can I create my own thread pool and assign this servlet to handle this script? We are using WebLogic 9.2 server. Or is there any other better approach to this? Appreciate any thoughts.

Yes it is possible. Instead of using the default bootstrapping manager (starting with Weblogic 9.x, the run queues are replaced with worker managers for thread pools 1 ), you can create a worker manager with certain restrictions , like max-threads-constraint

and maybe capacity

. You can then assign the servlet to a specific job manager using the wl-dispatch-policy deployment descriptor file weblogic.xml

.




1 Note that it is still possible to enable the WebLogic 8.1 Thread Pool Model and use Execute Queues.

+3


source







All Articles