Define priority on servlets...
843841Jun 8 2005 — edited Jun 8 2005Hi,
Trying to improve the performance of my application, I was asking myself:
"Can I set priority on servlets?"
The idea is that some servlets are performing a lot of logic (taking quiet a long time) and other much less (taking nearly no time).
So under heavily load many threads can be created and, the ones allocated to the fastest servlets may wait before being served whereas they do not require much CPU or resources.
So, why not serve servlets which are responding fast, before the slow ones?
Doing so should reduce the number of waiting threads, and augment the number of hits/sec?
I do not think that adding priority to servlet is part of any specification.
But I was wondering if someone has an opinion on that idea? Or if someone has already implemented such pattern (may be using filters)?
Thx for your comments