hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Bounding the number of outstanding requests with the reactor
Date Tue, 29 Dec 2015 18:44:02 GMT
I have an application that needs to send many http requests. However,
I would like to bound the maximum number of outstanding requests.

The reason is that the requests are being sent to a service that is
running in an AWS autoscaled environment. When there is a large
increase in load, the environment will start additional instances. So,
I would prefer that a sudden spike in demand remains queued in my
application and not be turned into pending requests.

https://hc.apache.org/httpcomponents-core-ga/httpcore-nio/apidocs/org/apache/http/impl/nio/reactor/IOReactorConfig.Builder.html
does not seem to have a parameter that would correspond to such a
limit. I could implement this for myself by having a queue, and a
thread that just sat pushing requests from the queue into the reactor,
and stopped when it reached my limit of outstanding requests.

Is my analysis plausible?

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message