You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In mostly-read servers, in order to allow the server to keep answer to its clients, it would be helpful to give the read requests (e.g. GET or HEAD) some priority over the update requests (e.g. PUT, POST, DELETE).
Suggestion for implementation: in the availability filter, add threshold for the update requests, so if the number of available thread exceeds this threshold, the server will reject the update requests with SERVER IS BUSY HTTP status (503), as currently done when there are no available thread at all. For read requests, the server will keep the current behavior.
Other solution may be to somehow split the update requests and the read requests to two different thread pool.
The text was updated successfully, but these errors were encountered:
I agree that this is useful functionality. I recommend looking at using Jetty's QoS filter. If added before the AvailabilityFilter, I think it can provide the desired priorities based on URL patterns. If you want to group requests specifically based on HTTP method instead, it seems easy to subclass the filter and override the getPriority method. Have a look here for more details: http://www.eclipse.org/jetty/documentation/current/qos-filter.html
The problem is that I don't think we can currently add our own filters before the built-in filters. In general, the ability to insert filters at various points should be considered for a future release. Perhaps we should start a new thread on this.
Alternatively, I suggest considering having foundation include Jetty's QoS, possibly wrapping it to simplify setting up priority based on HTTP method as requested by nahsh.
In mostly-read servers, in order to allow the server to keep answer to its clients, it would be helpful to give the read requests (e.g. GET or HEAD) some priority over the update requests (e.g. PUT, POST, DELETE).
Suggestion for implementation: in the availability filter, add threshold for the update requests, so if the number of available thread exceeds this threshold, the server will reject the update requests with SERVER IS BUSY HTTP status (503), as currently done when there are no available thread at all. For read requests, the server will keep the current behavior.
Other solution may be to somehow split the update requests and the read requests to two different thread pool.
The text was updated successfully, but these errors were encountered: