[
https://issues.apache.org/jira/browse/HTTPCLIENT-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Patrick Barry updated HTTPCLIENT-2233:
--------------------------------------
Description:
We wish to capture metrics on ioReactor threadpool. But it is so locked down,
we cannot provide our own executor, nor capture metrics around a provided one.
We are entertaining manually capturing some metrics from a customized
ThreadPool, but that definitely not ideal.
*Details:*
In HttpAsyncClientBuilder.java, the builder does not expose the ability to
provide your own implementation of AbstractIOReactorBase. Therefore, you are
stuff using the default, that you do not have any access to.
*Goal:* We need client metrics. We need a way to capture runtime metrics which
would alert us when we start to experience back pressure, resource starvation,
etc.
{code:java}
final DefaultConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(
ioEventHandlerFactory,
ioReactorConfig != null ? ioReactorConfig : IOReactorConfig.DEFAULT,
threadFactory != null ? threadFactory : new
DefaultThreadFactory("httpclient-dispatch", true),
LoggingIOSessionDecorator.INSTANCE,
ioReactorExceptionCallback != null ? ioReactorExceptionCallback :
LoggingExceptionCallback.INSTANCE,
null,
new Callback<IOSession>() {
@Override
public void execute(final IOSession ioSession) {
ioSession.enqueue(new ShutdownCommand(CloseMode.GRACEFUL),
Command.Priority.IMMEDIATE);
}
});
{code}
-The only thing we have see around metrics for this library is
FutureRequestExecutionService. However, haven't seen anyone use it with
HttpAsyncClient. It looks like if we were to try to use it, we would have 2
executors in play. The ioReactor threadpool doing the work, the another one
(FutureRequestExecutionService executor) that would wrap the work being done
on the ioReactor. Because of that, it doesn't feel like that is the route we
should go, but definitely need advise in this area.-
FutureRequestExecutionService is not an option because it only support
HttpClient, not AsyncHttpClient
was:
We wish to capture metrics on ioReactor threadpool. But it is so locked down,
we cannot provide our own executor, nor capture metrics around a provided one.
We are entertaining manually capturing some metrics from a customized
ThreadPool, but that definitely not ideal.
*Details:*
In HttpAsyncClientBuilder.java, the builder does not expose the ability to
provide your own implementation of AbstractIOReactorBase. Therefore, you are
stuff using the default, that you do not have any access to.
*Goal:* We need client metrics. We need a way to capture runtime metrics which
would alert us when we start to experience back pressure, resource starvation,
etc.
{code:java}
final DefaultConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(
ioEventHandlerFactory,
ioReactorConfig != null ? ioReactorConfig : IOReactorConfig.DEFAULT,
threadFactory != null ? threadFactory : new
DefaultThreadFactory("httpclient-dispatch", true),
LoggingIOSessionDecorator.INSTANCE,
ioReactorExceptionCallback != null ? ioReactorExceptionCallback :
LoggingExceptionCallback.INSTANCE,
null,
new Callback<IOSession>() {
@Override
public void execute(final IOSession ioSession) {
ioSession.enqueue(new ShutdownCommand(CloseMode.GRACEFUL),
Command.Priority.IMMEDIATE);
}
});
{code}
The only thing we have see around metrics for this library is
FutureRequestExecutionService. However, haven't seen anyone use it with
HttpAsyncClient. It looks like if we were to try to use it, we would have 2
executors in play. The ioReactor threadpool doing the work, the another one
(FutureRequestExecutionService executor) that would wrap the work being done
on the ioReactor. Because of that, it doesn't feel like that is the route we
should go, but definitely need advise in this area.
> Metrics missing
> ---------------
>
> Key: HTTPCLIENT-2233
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2233
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (async)
> Affects Versions: 5.1.3
> Reporter: Patrick Barry
> Priority: Major
>
> We wish to capture metrics on ioReactor threadpool. But it is so locked
> down, we cannot provide our own executor, nor capture metrics around a
> provided one. We are entertaining manually capturing some metrics from a
> customized ThreadPool, but that definitely not ideal.
> *Details:*
> In HttpAsyncClientBuilder.java, the builder does not expose the ability to
> provide your own implementation of AbstractIOReactorBase. Therefore, you are
> stuff using the default, that you do not have any access to.
> *Goal:* We need client metrics. We need a way to capture runtime metrics
> which would alert us when we start to experience back pressure, resource
> starvation, etc.
>
> {code:java}
> final DefaultConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(
> ioEventHandlerFactory,
> ioReactorConfig != null ? ioReactorConfig : IOReactorConfig.DEFAULT,
> threadFactory != null ? threadFactory : new
> DefaultThreadFactory("httpclient-dispatch", true),
> LoggingIOSessionDecorator.INSTANCE,
> ioReactorExceptionCallback != null ? ioReactorExceptionCallback :
> LoggingExceptionCallback.INSTANCE,
> null,
> new Callback<IOSession>() {
> @Override
> public void execute(final IOSession ioSession) {
> ioSession.enqueue(new ShutdownCommand(CloseMode.GRACEFUL),
> Command.Priority.IMMEDIATE);
> }
> });
> {code}
> -The only thing we have see around metrics for this library is
> FutureRequestExecutionService. However, haven't seen anyone use it with
> HttpAsyncClient. It looks like if we were to try to use it, we would have 2
> executors in play. The ioReactor threadpool doing the work, the another one
> (FutureRequestExecutionService executor) that would wrap the work being done
> on the ioReactor. Because of that, it doesn't feel like that is the route we
> should go, but definitely need advise in this area.-
> FutureRequestExecutionService is not an option because it only support
> HttpClient, not AsyncHttpClient
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]