close http-connection on internal server error from broker - #265
Merged
Conversation
Contributor
|
Could we also set the closing of the HTTP session on the server side? When Jetty catches the exception is maybe possible to force it to use |
rdhabalia
force-pushed
the
http_strat
branch
2 times, most recently
from
March 2, 2017 01:13
37957e2 to
c548404
Compare
merlimat
approved these changes
Mar 2, 2017
rdhabalia
added a commit
that referenced
this pull request
Mar 10, 2017
* close http-connection on internal server error from broker * broker kills current session on internal-server-error * add broker-address into response for client-debugging
hangc0276
pushed a commit
to hangc0276/pulsar
that referenced
this pull request
May 26, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
By default AsyncHttpClient has Keep-alive enabled and it get connected to the bad-broker then client repeatedly fails to perform lookup requests. In that case, connection should be closed and client should be able to connect with other broker to get the request served.
eg: sometimes broker is not able to create zk-session and it keeps failing to authenticate client-request so, client should be redirected to other broker by closing client-side connection on broker's
InternalServerErrorModifications
add
KeepAliveStrategyinhttpClientto disable keep-alive afterinternalServerError.Result
AsyncHttpClientshould close the connection onInternalServerError