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

Handle close_notify in ConnectionPoolHandler #1841

Merged
merged 8 commits into from
Oct 30, 2024
Merged

Conversation

jguerra
Copy link
Collaborator

@jguerra jguerra commented Oct 29, 2024

I also added a new status category to differentiate this failure from connection resets

@jguerra jguerra changed the title WIP Close on completion close event Handle close_notify in ConnectionPoolHandler Oct 30, 2024
@@ -55,6 +55,10 @@ public enum OutboundErrorType implements ErrorType {
ERROR_TYPE_ORIGIN_RESET_CONN_STATUS.get(),
ZuulStatusCategory.FAILURE_ORIGIN_RESET_CONNECTION,
ClientException.ErrorType.CONNECT_EXCEPTION),
CLOSE_NOTIFY_CONNECTION(
504,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This is technically the equivalent of CONNECT_ERROR imo, which maps to a 502 vs 504

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated 👍

@@ -97,6 +99,11 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc
+ reason.name() + ", " + ChannelUtils.channelInfoForLogging(ctx.channel());
closeConnection(ctx, msg);
}
} else if(evt instanceof SslCloseCompletionEvent event) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@@ -58,6 +60,7 @@ public ConnectionPoolHandler(OriginName originName) {
this.inactiveCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_inactive", originName.getMetricId());
this.errorCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_error", originName.getMetricId());
this.headerCloseCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_headerClose", originName.getMetricId());
this.sslCloseCompletionCounter = SpectatorUtils.newCounter(METRIC_PREFIX + "_sslClose", originName.getMetricId());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🏼

@jguerra jguerra merged commit 5e2bdf1 into master Oct 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants