Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343567 - HttpClient does not limit the destination's exchange queue
Summary: HttpClient does not limit the destination's exchange queue
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: client (show other bugs)
Version: 7.4.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.2.x   Edit
Assignee: Simone Bordet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 11:19 EDT by Simone Bordet CLA
Modified: 2011-04-21 11:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Bordet CLA 2011-04-21 11:19:23 EDT
A client may perform requests to the same address at a rate faster than what the server can respond.
In this case, HttpDestination queues the requests in a unbounded queue, so the client has no idea that it is producing requests at a too fast rate.
Increasing the number of connections may be a solution, but often this parameter is limited to save resources.

We need a mechanism where we can limit the HttpDestination queue and reject the new requests that overflows the queue, so the client can handle the situation and eventually slow down the request rate.
Comment 1 Simone Bordet CLA 2011-04-21 11:30:46 EDT
Added method HttpClient.setMaxQueueSizePerAddress(int), and HttpDestination.setMaxQueueSize(int), and throwing RejectedExecutionException in case the queue limit is reached.