Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifying diagnosis of retries #410

Closed
tjcelaya opened this issue Apr 9, 2018 · 2 comments
Closed

Simplifying diagnosis of retries #410

tjcelaya opened this issue Apr 9, 2018 · 2 comments
Assignees

Comments

@tjcelaya
Copy link
Contributor

tjcelaya commented Apr 9, 2018

It is currently impossible to determine how frequently the client is retrying requests without turning on DEBUG logging. Since there are many other logs at this logging level it would be helpful for users if we provided some warning or notice of the fact that we're having trouble performing requests.

Options we've identified include the following:

  • Expose a retry rate in the existing PoolStatsMBean (or in a new bean). We can track this from MantaHttpRequestRetryHandler.
  • Using the same retry-rate-tracking, log a higher-visibility message (INFO/WARN/ERROR instead of DEBUG) when the retry rate exceeds a certain threshold. We can set a sane default for this if we want to it to be enabled by default but we should be careful to not log this message too frequently.
  • Embed an HTTP header in retry requests that can be tracked by the server-side as an indicator of "unhealthy" client activity.

We can do any or all or none of these options. we just need to be clear about why we select our option.

@tjcelaya tjcelaya self-assigned this Apr 11, 2018
tjcelaya added a commit to tjcelaya/java-manta that referenced this issue Apr 25, 2018
…, namely that some users do not use JMX and instead prefer metrics to be reported through logs. Checkstyle, CHANGELOG and additional tests still pending
@tjcelaya
Copy link
Contributor Author

Since not all users track metrics through JMX, part of the requirement for this feature is the ability to expose metrics through logging. Since we're going with dropwizard's metrics library to satisfy option 1, we can leverage the variety of reporters available.

@tjcelaya
Copy link
Contributor Author

tjcelaya commented May 7, 2018

As described in the final comment in #412, we'll need a total request count to provide context for the retry count. After some experimentation with the HttpClient metrics package, I've determined that we can't use that specific package since it relies on providing a custom implementation of HttpRequestExecutor and HttpClientConnectionManager classes from Apache HttpClient (which we already do ourselves). Thankfully, the metrics-httpclient package is relatively small, so it should be straightforward to subclass MantaHttpRequestExecutor to add an instrumented version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants