Or use the QoSFilter to setup a higher priority for internal vs external
requests. :-)

--
Joakim Erdfelt <[email protected]>
webtide.com <http://www.webtide.com/> - eclipse.org/jetty - cometd.org
Expert advice, services and support from from the Jetty & CometD experts

On Thu, May 21, 2015 at 3:10 PM, Hrishikesh Gadre <[email protected]>
wrote:

> Hi,
>
> I am currently working on an application which comprises of multiple
> servers. Each server is deployed using a dedicated Jetty instance. Each
> server accepts HTTP requests from external clients as well as other servers
> in the system. i.e. the servers form the peer-to-peer system using HTTP
> protocol.
>
> I am currently working on a feature to separate out internal vs external
> requests such that a % of worker threads are reserved for internal requests
> and remaining threads for external ones.
>
> I could think of couple of approaches to solve this problem. Can you
> please take a look and provide feedback?
>
>
> (1) Using Servlet 3 specification
>
> The idea would be to define two separate thread-pools internally and
> submit the asynchronous request based on request type. My understanding
> here is that it would require an additional thread switch as compared to
> synchronous request processing (jetty_acceptor -> jetty_selector ->
> jetty_worker -> app_thread).  Is this accurate? If yes is there a way to
> avoid this?
>
> (2) Somehow customizing the Jetty implementation such that we reserve a %
> of jetty worker threads for internal requests and other for external
> requests. The flow would look like this,
>
>   jetty_acceptor -> jetty_selector (Demux) ---->
> jetty_worker_pool_for_internal
>                                                                    |
>                                                                    ----->
> jetty_worker_pool_for_external
>
> The demux here would look at the HTTP request to figure out its type and
> submit it to appropriate thread-pool. Is this possible? If yes, any
> pointers?
>
> Any other approach I may have missed?
>
> Thanks in advance,
> -Hrishikesh
>
>
>
>
>
>
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to